Re:Regular Expressions – Mastering Lookahead and Lookbehind
by freedomben on Friday March 16, 2018 @12:34AM
(#16598651)
The back slashes for escaping are absolutely awful. This is one of the worst things about Java.
It's much better in languages with regex literals like Ruby and JavaScript.
Re:Regular Expressions – Mastering Lookahead and Lookbehind
by kbp on Friday March 16, 2018 @01:56PM
(#16602571)
It's especially nicer in Ruby (which got it from Perl) where you can use whatever delimiters you like for regexes, with /abc/, %r"abc", %r{abc}, %r#abc# and so on all being equivalent, so you can just about always pick something that won't clash with the characters in your pattern (You can even use spaces as the delimiters, which looks terrible).
I'm not sure how you could fix that without introducing completely new characters or color-coding parts of the expression though.