Menu

#1692 Filter creation help, are there variables?

3.0.15
closed
nobody
None
3
2016-01-27
2015-07-28
No

Hello,

im trying to create a new rule which inserts a new tag behind <body>, this works quite well so far:
s|<body<span>[^>]*>|<body><xx stat.php="">|sigU

The Problem is that most Websites start with <body class="xxx"> or <body id="xxx"> and so on, how can i get the code between <body ...and...=""> to the other side?

Can someone help me?

regards from austria,

Ben

Discussion

  • Fabian Keil

    Fabian Keil - 2015-07-29

    If you put parts of the pattern in parentheses you can refer to them
    in the substitution by $1, $2 ...

    For details see the "js-annoyances" example in the filter documentation:
    http://www.privoxy.org/user-manual/filter-file.html

    If the documentation isn't clear enough, please let us know so
    we can improve it.

     
  • Fabian Keil

    Fabian Keil - 2016-01-27
    • status: open --> closed
     

Log in to post a comment.