in reply to Refactoring Regular Expressions
Why are you using substr at all? There seems to be no need to do that, and if you don't use it, you'll only need the one regex (the first one) -- unless of course the data turns out to be malformed in some way.
But I would agree with the suggestion to use modules for this. In the long run, you'll be glad you did.
|
|---|