in reply to Regex for Differentiating Underscore and Whitespace

Your regexp is getting turned into //ms, which matches everything, because whitespace is removed from the regex when you use /x. Either remove the /x modifier, or use \s instead of literal whitespace.


We're not surrounded, we're in a target-rich environment!