Hacker News new | ask | show | jobs
by freedomben 3022 days ago
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.

1 comments

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).