At least in CF 5 and prior, CF regex engine doesn't use the / character to
indicate a character class ( I'm assuming /d is supposed to mean [:digit:]
..

This ought to get out the value you want:

<cfset mydimensions = REReplaceNoCase(myfilepath,"^.* ([0-9]+x[0-9]+)
*$","\1")>

Though cf-regex@houseoffusion might be a better place for this particular
question.

hth


S. Isaac Dealey
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046

> I thought of that too, but what if there's a space in the file path?

>> -----Original Message-----
>> From: Patric Stumpe [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, October 10, 2002 12:04 PM
>> To: CF-Talk
>> Subject: Re: SOT: RegEx
>>
>>
>> Hi Willy,
>>
>> if it's always the same structure you could get use
>> ListGet(myString, 3, ' ') With space as delimiter.
>>
>> Just a thought...
>>
>> Patric
>>
>>
>> WR> Ok, I have a string that looks like this:
>>
>> WR> /web/path/to/myfile.jpg JPEG 1280x1024 DirectClass 8-bit
>> 95kb 0.3u 0:01
>>
>> WR> It's an imagemagic identification of a file that my user
>> is uploading.  myfile.jpg is CFFILE.clientfile.
>>
>> WR> I need to go through this thing and get the 1280x1024
>> out.  I could come up with a way to do this w/o regular
>> expressions, but it wouldn't be as flexible as I'd like it to be.
>>
>> WR> I've tried this:
>>
>>
>> WR>         <cfset location = REFind("/d+x/d+", mystring)>
>>
>> WR> And this:
>>
>> WR>         <cfset start = REFind("[/d+]x[/d+]", mystring)>
>>
>> WR> Doesn't seem to work.  Any ideas?
>>
>>
>>
>>
>>
>> WR> -----
>> WR> Willy Ray
>> WR> Web Applications Developer
>> WR> Certified Advanced ColdFusion Developer
>> WR> Westminster College
>>
>> WR>
>>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to