Regular Expression trouble
-
I wrote a Regular Expression and it insisted on doing what I asked rather than what I wanted. :sigh: For part of it, I wanted to match a plus-sign (+), a minus-sign (-), or a slash (/); so of course I typed
[+-/]
, and it seemed to work fine, then I spent several hours trying to find out why it was also accepting a comma (,) ... oh, right, I mean[+\\-/]
:doh: I'm sure I'll make that mistake again. -
I wrote a Regular Expression and it insisted on doing what I asked rather than what I wanted. :sigh: For part of it, I wanted to match a plus-sign (+), a minus-sign (-), or a slash (/); so of course I typed
[+-/]
, and it seemed to work fine, then I spent several hours trying to find out why it was also accepting a comma (,) ... oh, right, I mean[+\\-/]
:doh: I'm sure I'll make that mistake again.