Adoption of perl/javascript-style regexp syntax

Dmitrii Dimandt dmitriid@REDACTED
Mon Jun 1 11:29:11 CEST 2009


I've just come across re and I like it :)

The only issue I have with it is that I have to specify regexps as  
strings. This leads to ugly-as-hell constucts like these:

{ok, Re} = re:compile("(?<!\\\\)#")

It actually tries to find two backslashes there... Or just one? I  
don't know :) What if Erlang could allow this:

Re = /(?<!\\)#/

?

Benefits:
- Less error-prone
- Expressions written this way can be parsed and compiled by the  
compiler (boost in performance, syntax checked at compile-time)


Any thoughts?


More information about the erlang-questions mailing list