3 ms·
> what is written as \(f..\)\1 in BRE is written as (f..)\1 in ERE Oddly, there are no backreferences in POSIX EREs.
by jwilk 3y ago
> what is written as \(f..\)\1 in BRE is written as (f..)\1 in ERE
Oddly, there are no backreferences in POSIX EREs.
- susam 3y agoYou are right indeed. Looked at the specification again and indeed there is no back-reference in POSIX ERE. Quoting from <https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/xrat/V4_xbd_chap09.html https://pubs.opengroup.org/onlinepubs/9699919799.2008edition...>: > It was suggested that, in addition to interval expressions, back-references ( '\n' ) should also be added to EREs. This was rejected by the standard developers as likely to decrease consensus. Updated my comment to present a better example that avoids back-references. Thanks!
- GrumpySloth 3y agoThat’s because POSIX EREs are actual regular expressions thank god.