News for hackers. Stuff that matters.
Re:Regular Expressions – Mastering Lookahead and Lookbehind by arkh on Friday March 16, 2018 @04:21AM (#16599323)
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

Re:Regular Expressions – Mastering Lookahead and Lookbehind by reificator on Friday March 16, 2018 @03:08PM (#16603191)
That would be nice to have when working in Javascript, making code a lot more readable and easy to update.

Alas, we don't get such luxuries as named groups or static typing... Woe is me.