Jethro commented on a Page, Bot color changer  -  Jun 21, 2011

It stop at the word by itself or followed by a space. That way you don't trigger the regex if someone says, for example "colorful" or "colourful"

I used to utilize the word boundary \b, but it doesn't stop punctuation characters from triggering it to what I call it a "false positive." A sentence usually consists of many words in this format: "word1 word2 word3," so ( |$) will make sure it either proceeds with a space or ends the word as is.

It also allows you to use $2 if you don't want to use $regml() to refer to the value.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.