|
|
|
|
|
by arkh
3019 days ago
|
|
If you're using PCRE you should also make use of named patterns. It makes the expression easier to understand as you can reuse parts of it (a little like functions) and the matched patterns can be then used in your language with their name instead of their position. Decoupling the usage from the regexp so it is more robust. http://www.rexegg.com/regex-capture.html#namedgroups |
|
Alas, we don't get such luxuries as named groups or static typing... Woe is me.