Not exactly. It has to be a replace opertion in mid-string. It's doable with ReplaceList(), except that ReplaceList() has no NoCase counterpart.
s = 'Hours of operation: MonFri 11a8p SatSun 11a5p'; ----- Original Message ----- From: "Ben Nadel" <[EMAIL PROTECTED]> To: "CF-Talk" <[email protected]> Sent: Wednesday, December 07, 2005 11:56 AM Subject: RE: Regex Help Needed > You could just do something a bit more simple: > > strTarget = "SatSun"; > strResult = (Left(strTarget, 3) & "," & Right(strTarget, 3)); > > ....................... > Ben Nadel > Web Developer > Nylon Technology > 6 West 14th Street > New York, NY 10011 > 212.691.1134 > 212.691.3477 fax > www.nylontechnology.com > > "Vote for Pedro" > > -----Original Message----- > From: Jim McAtee [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 07, 2005 1:46 PM > To: CF-Talk > Subject: Regex Help Needed > > 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)(su > n))'; > 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:226466 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

