CF doesn't interpret $ as end-of-line but end-of-string. Similarly, ^ is beginning of string, not line. I'd use [#chr(10)##chr(13)#]+ instead.
You'd be surprised how often this trips up people that learned regex on other systems (e.g., Perl). You know. People like me. :-) --Ben Patric Stumpe wrote: > Hi folks, > > I've a strange problem with using the multiline escape sequence in > CFMX6.1. > > First I load a CSS file and replace every linebreak to chr(10) and > afterwards I try to prepend every line with a simple string: > > sMailCSS = REReplaceNoCase(sMailCSS, "(?m)^(.+)$", "div.previewhtml \1", > "ALL"); > > But this doesn't work on each line separatly but only on the whole > string. Am I missing something? Hope some of you guys can enlighten > me... > > > Greetz > Patric > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:21:959 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/21 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:21 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
