: /web/path/to/myfile.jpg JPEG 1280x1024 DirectClass 8-bit 95kb 0.3u 0:01
:       <cfset location = REFind("/d+x/d+", mystring)>
:
: And this:
:
:       <cfset start = REFind("[/d+]x[/d+]", mystring)>

I'm assuming you're using CFMX, or the style you're trying to employ won't
work.

IIRC, in CFMX, you almost had it with the first refind, but you need to use
backslashes instead of forward slashes.  You could also do this:

size = rereplace(mystring, ".*(\d+x\d+).*", "\1")

If you are using CF5, you need to do something like

start = refind("[0-9]+x[0-9]+", mystring)
or
size = rereplace(mystring, ".*([0-9]+x[0-9]+).*", "\1")

HTH.

As always, a plug for the CF-RexEx list.  If you like to use them, are
interested about learning more about them, or just want to know what the
heck all this "regular expression" junk is, check out the archives, post, or
join at:
http://www.houseoffusion.com/cf_lists/index.cfm?method=threads&forumid=21



  --Ben Doom
    Programmer & General Lackey
    Moonbow Software

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to