What you're talking about is backreferencing, pg. 19 of "Mastering RegEx".
;) This is also covered briefly in the latest Cold Fusion Web Application
Const. Kit by Forta, et al. Without knowing more about what you're trying to
do, or an example string, I can't really say more on that, mainly 'cause
it's easier for me to visualize.

Steve

-----Original Message-----
From: Dan Haley [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 13, 2000 4:13 PM
To: '[EMAIL PROTECTED]'
Subject: regex help

My copy of Mastering Regular Expressions is on its way, but for now can
anyone help with the following?

Given a string such as "sometext[othertext[finaltext] - maybemoretext[]]", I
want to return both "sometext", and the contents of the outer "[ ]".

Any suggestions on how to do nested regexes like this?

Thanks,
Dan

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to