I didn't use named quotes in my parser so this isn’t well tested.

<cfset block = '[quote name="foo"]Quoted text[/quote]'>

<cfoutput>
<fieldset>
<legend>#rereplace(block, "\[quote name=""(.*?)""\].*?\[\/quote\]",
"\1")#</legend>
#rereplace(block, "\[quote name="".*?""\](.*?)\[\/quote\]", "\1")#
</fieldset>
</cfoutput>

..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

  

-----Original Message-----
From: Rick Root [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 14, 2006 8:16 AM
To: CF-Talk
Subject: Regex matches

Given the following text:

[quote name="foo"]This is quoted text[/quote]

How would I use a regular expression to return two variables containing 
the text "foo" and "This is quoted text"?

Thanks.

Rick



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235298
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to