Menu

#895 PCRS lacks support for named backreferences

version 3.0
open
nobody
5
2015-12-08
2015-12-07
Andrew
No

Named capture groups (?<name>regexp) are widely used in PCRE both for further matching (e.g. as \g{NAME}) and for substitution, as $+{NAME}. Privoxy seems to have its own substitution engine called PCRS (Perl Compatible Regular Substitution) which has limited support for symbolic backreferences: only supports $+, $&, $' and $`. Thus, in case of named backreference $+{NAME} PCRS replaces $+ with latest match and leaves {NAME} part untouched.</name>

Discussion

  • Fabian Keil

    Fabian Keil - 2015-12-08

    Thanks for the report.

    The lack of support for named backreferences isn't a bug and there are quite
    a few other PCRE features Privoxy currently does not support (and which
    therefore are not documented to be supported).

    I agree that named backreferences support in PCRS would be nice to have,
    but given the length of our TODO list Privoxy is unlikely to support them
    any time soon unless someone interested in them provides patches.

    The official TODO list is available at:
    http://ijbswa.cvs.sourceforge.net/viewvc/ijbswa/current/TODO?view=markup

    Also note that you can use named backreferences in external filters already.

     
  • Andrew

    Andrew - 2015-12-08

    Thank you for reply.

    Since it's not a bug, can you please move the ticket to Feature Requests?

    External filters might work for me, totally forgot about that feature.

     
    • Fabian Keil

      Fabian Keil - 2015-12-10

      Sourceforge broke the tracker a couple of months ago and I'm
      no longer able to move tickets or change their attributes.

      Leaving SF is on the TODO list.

       

Log in to post a comment.

MongoDB Logo MongoDB