SWI-Prolog / packages-pcre

SWI-Prolog package for access to Perl Regular Expressions
5 stars 7 forks source link

re_replace doesn't use the PCRE2 functions #28

Open kamahen opened 1 year ago

kamahen commented 1 year ago

re_replace/5 has Prolog code for doing the replacement. PCRE2 has support for replacement (I don't think this was in PCRE1), so it might make sense to use the PCRE2 code rather than the Prolog code - possibly the PCRE2 has features that aren't in the current code. However, this would likely break compatibility, so might not be worth doing; especially as Prolog as DCGs, which are often more flexible (and even more efficient) than regexps.