Synthetic commit for tag v_3_0_1
[privoxy.git] / doc / webserver / user-manual / filter-file.html
index e4a1c5c..e890bbf 100644 (file)
@@ -7,7 +7,7 @@ NAME="GENERATOR"
 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
 "><LINK
 REL="HOME"
-TITLE="Privoxy User Manual"
+TITLE="Privoxy 3.0.0 User Manual"
 HREF="index.html"><LINK
 REL="PREVIOUS"
 TITLE="Actions Files"
@@ -37,7 +37,7 @@ CELLSPACING="0"
 ><TH
 COLSPAN="3"
 ALIGN="center"
->Privoxy User Manual</TH
+>Privoxy 3.0.0 User Manual</TH
 ></TR
 ><TR
 ><TD
@@ -273,7 +273,7 @@ CLASS="SECT2"
 ><H2
 CLASS="SECT2"
 ><A
-NAME="AEN2944">9.1. Filter File Tutorial</H2
+NAME="AEN3013">9.1. Filter File Tutorial</H2
 ><P
 > Now, let's complete our <SPAN
 CLASS="QUOTE"
@@ -589,7 +589,7 @@ WIDTH="100%"
 CLASS="SCREEN"
 ># The status bar is for displaying link targets, not pointless blahblah
 #
-s/window\.status\s*=\s*['"].*?['"]/dUmMy=1/ig</PRE
+s/window\.status\s*=\s*(['"]).*?\1/dUmMy=1/ig</PRE
 ></TD
 ></TR
 ></TABLE
@@ -630,7 +630,28 @@ CLASS="EMPHASIS"
 >or</I
 ></SPAN
 > a double quote"</SPAN
->.</P
+>. Finally, <TT
+CLASS="LITERAL"
+>\1</TT
+> is
+ a backreference to the first parenthesis just like <TT
+CLASS="LITERAL"
+>$1</TT
+> above,
+ with the difference that in the <SPAN
+CLASS="emphasis"
+><I
+CLASS="EMPHASIS"
+>pattern</I
+></SPAN
+>, a backslash indicates
+ a backreference, whereas in the <SPAN
+CLASS="emphasis"
+><I
+CLASS="EMPHASIS"
+>substitute</I
+></SPAN
+>, it's the dollar.</P
 ><P
 > So what does this job do? It replaces assignments of single- or double-quoted
  strings to the <SPAN
@@ -652,7 +673,7 @@ WIDTH="100%"
 CLASS="SCREEN"
 ># Kill OnUnload popups. Yummy. Test: http://www.zdnet.com/zdsubs/yahoo/tree/yfs.html
 #
-s/(&#60;body .*)onunload(.*&#62;)/$1never$2/iU</PRE
+s/(&#60;body [^&#62;]*)onunload(.*&#62;)/$1never$2/iU</PRE
 ></TD
 ></TR
 ></TABLE
@@ -687,7 +708,20 @@ CLASS="LITERAL"
 CLASS="LITERAL"
 >i</TT
 > option makes the pattern matching
- case-insensitive.</P
+ case-insensitive. Also note that ungreedy matching alone doesn't always guarantee
+ a minimal match: In the first parenthesis, we had to use <TT
+CLASS="LITERAL"
+>[^&#62;]*</TT
+>
+ instead of <TT
+CLASS="LITERAL"
+>.*</TT
+> to prevent the match from exceeding the 
+ &#60;body&#62; tag if it doesn't contain <SPAN
+CLASS="QUOTE"
+>"OnUnload"</SPAN
+>, but the page's
+ content does.</P
 ><P
 > The last example is from the fun department:</P
 ><P
@@ -736,6 +770,8 @@ CLASS="SCREEN"
 #
 s* industry[ -]leading \
 |  cutting[ -]edge \
+|  customer[ -]focused \
+|  market[ -]driven \
 |  award[ -]winning # Comments are OK, too! \
 |  high[ -]performance \
 |  solutions[ -]based \
@@ -753,7 +789,7 @@ s* industry[ -]leading \
 CLASS="LITERAL"
 >x</TT
 > option in this job turns on extended syntax, and allows for
- e.g. the liberal use of (non-interpreted!) whitespace for nicer formatting.</P
+ e.g. the liberal use of (non-interpreted!) whitespace for nicer formatting. </P
 ><P
 > You get the idea?</P
 ></DIV