Backreferences in PCRE

Tristan Sloughter tristan.sloughter@REDACTED
Fri Jan 21 21:22:24 CET 2011


The re modules documentation(http://www.erlang.org/doc/man/re.html)
references backreferences like it supports them. However my attempts to use
them failed (specifically the pattern '(.)\1\1' which works fine for me in
other languages regex libraries) and I found old emails (
http://www.trapexit.org/forum/viewtopic.php?p=45770&sid=8217e3c278c4ad9178964f5c6fb9085c)
to this list that say they are not supported and are purposely turned off in
PCRE. So I have a few questions:

Is this the case? Is there no chance of ever adding them? What is a good way
to implement something like /(.)\1\1/ to match 3 repeated characters if not
with backreferences?

Thanks,
Tristan


More information about the erlang-questions mailing list