Ah ok, then the answer is nope.
This comes straight from the cfdocs.
The number of elements in the pos and len arrays will always be one if
you
do not use parentheses to denote subexpressions in the regular
expression.
<P>The value of st.pos[1] is: <CFOUTPUT>#st.pos[1]#.</CFOUTPUT></P>
<P>The value of st.len[1] is: <CFOUTPUT>#st.len[1]#.</CFOUTPUT></P>
<CFOUTPUT>
Substring is <b>[#Mid(testString,st.pos[1],st.len[1])#]</B>
</CFOUTPUT>
______________________
steve oliver
cresco technologies, inc.
http://www.crescotech.com
-----Original Message-----
From: Brent Goldman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 10:21 PM
To: CF-Talk
Subject: RE: extracting backreferences from an executed regex
Steve,
I don't need to access the backreferences IN the expression. I need to
access them AFTER the expression.
The way I want it:
<cfset datetime = REFindNoCase(regex, entry)>
<cfset month = datetime.br[1]>
<cfset day = datetime.br[2]>
<cfset year = datetime.br[3]>
The current way:
<cfset datetime = REFindNoCase(regex, entry)>
<cfset month = mid(entry, datetime.pos[1], datetime.len[1])>
<cfset day = mid(entry, datetime.pos[2], datetime.len[2])>
<cfset year = mid(entry, datetime.pos[3], datetime.len[3])>
Thanks
-Brent
> -----Original Message-----
> From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 24, 2002 7:03 PM
> To: CF-Talk
> Subject: RE: extracting backreferences from an executed regex
>
>
> You access the backreference with \1 or \2 etc.
>
> ReReplace("(.*?)asdf(.*?)", "\1 \2", string)
>
> ______________________
> steve oliver
> cresco technologies, inc.
> http://www.crescotech.com
>
>
> -----Original Message-----
> From: Brent Goldman [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 24, 2002 10:08 PM
> To: CF-Talk
> Subject: extracting backreferences from an executed regex
>
>
> Hi everyone,
>
> As of now, a regex operation doesn't return the backreferences, but
> only
> the length and the positions of them. What I want to do is
> extract the
> backreferences using the regex.pos[i] and regex.len[i] variables such
> that
> we can use regex.br[i] to get the backreference.
>
> Does anyone have any tags to do this?
>
> Thanks
> -Brent
>
>
______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists