Well, you don't really need the outside parens, so you could just ditch 
those.

I could be remembering this wrong, but IIRC, CF5's engine remembered 
backreferences in the order they are completed, not started, but I could 
be wrong about that.  It's been a little while since I had to play in 
that particular sandbox.  :-)

--Ben

Jim McAtee wrote:
> CF5.  In the following I keep getting a bad backreference error.  I 
> thought the nested expressions in parens should give me \1 = entire 
> matching string, then \2 = first submatch, \3 = 2nd submatch, etc.
> 
> I'm taking a string containing concatenated three-character weekday 
> abbreviations and expanding them.  Example:
> 
> SatSun => Sat,Sun
> 
> re = 
> '((sun)(mon)|(mon)(tue)|(tue)(wed)|(wed)(thu)|(thu)(fri)|(fri)(sat)|(sat)(sun))';
> s = REReplaceNoCase(s, re, '\2,\3', 'all');    // adjacent weekdays
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226475
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to