Gummo commented on a Page, Weather Bot  -  Feb 20, 2010

The following regex

/^!w(eather)?|f(orecast)?/Si

is incorrect. It will trigger when someone simply says "f" instead of "!f".
This is made worse by the fact that the regex isn't locked to even a word break, so any word starting with "f" will set it off...
To fix it easily you can use

/^!(w(eather)?|f(orecast)?)\b/Si

That's why it needs the parentheses around the main regex.

 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.