in reply to Range Issue with RegEx
I just want to capture 500, 501, 502, 531, 532
Currently you want to do something like /5(?:0[012]|3[12])/, although in the development version of Perl, which will one day be released as 5.10, you are better off (thanks to the work of Yves Orton) by just listing the alternations, and let the regexp engine build a trie out of the alternatives: /500|501|502|531|532/. This is fast.
• another intruder with the mooring in the heart of the Perl
|
|---|