regular expressions: ignoring certain chars globally
- by shi kui
Consider it that '_'s in a number doesn't change that number's value so 1000==1_000==10_00.
The Problem: given numbers like 1_244_23 1412_2 1_1111 etc..., how could I decide whether certain number appears in that collection? For example: 1244_23 yes, 11_111 yes, 1412_1 no.
How could using regex to solve this? I mean, if I could tell the regex engine just ignore these '_''s when matching then this problem becomes trivial? How could I do so?