I'm not certain that regex is doing exactly what you say it is, but
simply converting the PHP directly to CFML isas follows:

$wkstr = reReplaceNoCase('(\s)(\w+)$',' and \2',$wkstr)

Although the $ at the start of the variable names are not required in
CF, and the expression doesn't need to be that complex.

This should do the same thing:

wkstr = reReplace( '\w+$' , 'and \0' ,  wkstr )


For any of these expressions to work though, they can't be ran against
the entire "Every first second third fourth Sunday at 11:15" string,
but only on the "first second third fourth" string, otherwise they
will not work as desired.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1198
Subscription: http://www.houseoffusion.com/groups/regex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21

Reply via email to