I can't get my head around regular expressions! Help me please before I go mad! I need to replace one word with another, matching cases (if possible), but in a smart way. eg. "Ben lives in benland. But ben is actually not called ben. He's called ben-dabble" Say I want to replace 'ben' (any case) with 'mike', I would like to get:
"Mike lives in benland. But mike is actually not called mike. He's called mike-dabble" Note the punctuation - I only want whole words, or words which are surrounded by punctuation. Does that make sense? I know I'm asking a lot but doing it using normal code and replace() is a slow operation. Even a reg-ex which will just replace whole words (including if they're at the beginning or end of a string) would be fantastic. I could do 2 regexs to do the case-matching, if it's not possible to do it in 1. Many Thanks! --------------------------------- Yahoo! Plus - For a better Internet experience ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

