From 9e40214d04af75ee0765d4c77145c222d67c3849 Mon Sep 17 00:00:00 2001 From: oes Date: Fri, 17 May 2002 13:56:16 +0000 Subject: [PATCH] - Reworked & extended Templates chapter - Small changes to Regex appendix - #included authors.sgml into (C) and hist chapter --- doc/source/user-manual.sgml | 176 +++++++++++++++++++++++------------- 1 file changed, 114 insertions(+), 62 deletions(-) diff --git a/doc/source/user-manual.sgml b/doc/source/user-manual.sgml index 798d439d..e2a2a7d1 100644 --- a/doc/source/user-manual.sgml +++ b/doc/source/user-manual.sgml @@ -9,8 +9,10 @@ + + @@ -28,7 +30,7 @@ This file belongs into ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/ - $Id: user-manual.sgml,v 1.115 2002/05/16 16:25:00 oes Exp $ + $Id: user-manual.sgml,v 1.116 2002/05/17 03:23:46 hal9 Exp $ Copyright (C) 2001, 2002 Privoxy Developers See LICENSE. @@ -54,7 +56,7 @@ -$Id: user-manual.sgml,v 1.115 2002/05/16 16:25:00 oes Exp $ +$Id: user-manual.sgml,v 1.116 2002/05/17 03:23:46 hal9 Exp $ + +Authors + + &p-authors; + + + @@ -6015,30 +6081,29 @@ Requests Regular Expressions - Privoxy can use regular expressions - in various config files. Assuming support for pcre (Perl - Compatible Regular Expressions) is compiled in, which is the default. Such - configuration directives do not require regular expressions, but they can be - used to increase flexibility by matching a pattern with wild-cards against - URLs. + Privoxy uses Perl-style regular + expressions in its actions + files and filter file, + through the PCRE and + PCRS libraries. If you are reading this, you probably don't understand what regular expressions are, or what they can do. So this will be a very brief - introduction only. A full explanation would require a book ;-) + introduction only. A full explanation would require a book ;-) - Regular expressions is a way of matching one character - expression against another to see if it matches or not. One of the - expressions is a literal string of readable characters - (letter, numbers, etc), and the other is a complex string of literal - characters combined with wild-cards, and other special characters, called - meta-characters. The meta-characters have special meanings and - are used to build the complex pattern to be matched against. Perl Compatible - Regular Expressions is an enhanced form of the regular expression language - with backward compatibility. + Regular expressions provide a language to describe patterns that can be + run against strings of characters (letter, numbers, etc), to see if they + match the string or not. The patterns are themselves (sometimes complex) + strings of literal characters, combined with wild-cards, and other special + characters, called meta-characters. The meta-characters have + special meanings and are used to build complex patterns to be matched against. + Perl Compatible Regular Expressions are an especially convenient + dialect of the regular expression language. @@ -6125,14 +6190,6 @@ Requests - - - s/string1/string2/g - This is used to rewrite strings of text. - string1 is replaced by string2 in this - example. There must of course be a match on string1 first. - - - These are just some of the ones you are likely to use when matching URLs with Privoxy, and is a long way from a definitive @@ -6222,16 +6279,6 @@ Requests in the expression anywhere). - - s/microsoft(?!.com)/MicroSuck/i - This is - a substitution. MicroSuck will replace any occurrence of - microsoft. The i at the end of the expression - means ignore case. The (?!.com) means - the match should fail if microsoft is followed by - .com. In other words, this acts like a NOT - modifier. In case this is a hyperlink, we don't want to break it ;-). - - We are barely scratching the surface of regular expressions here so that you can understand the default Privoxy @@ -6246,6 +6293,11 @@ Requests http://www.perldoc.com/perl5.6/pod/perlre.html + + For information on regular expression based substititions and their applications + in filters, please see the filter file tutorial + in this manual. + @@ -6288,9 +6340,9 @@ Requests - Alternately, this may be reached at http://p.p/, but this - variation may not work as reliably as the above in some configurations. + There is a shortcut: http://p.p/ (But it + doesn't provide a fallback to a real page, in case the request is not + sent through Privoxy) @@ -6424,17 +6476,15 @@ Requests - Privoxy - Submit Filter Feedback + Privoxy - Submit Actions File Feedback - - - Credit: The site which gave me the general idea for these bookmarklets is + Credit: The site which gave us the general idea for these bookmarklets is www.bookmarklets.com. They have more information about bookmarklets. @@ -6574,16 +6624,15 @@ Requests The way Privoxy applies - actions - and filters + actions and filters to any given URL can be complex, and not always so easy to understand what is happening. And sometimes we need to be able to see just what Privoxy is doing. Especially, if something Privoxy is doing is causing us a problem inadvertently. It can be a little daunting to look at the actions and filters files themselves, since they tend to be filled with - regular expressions whose consequences are not always - so obvious. + regular expressions whose consequences are not + always so obvious. @@ -6891,6 +6940,9 @@ Requests Temple Place - Suite 330, Boston, MA 02111-1307, USA. $Log: user-manual.sgml,v $ + Revision 1.116 2002/05/17 03:23:46 hal9 + Fixing merge conflict in Quickstart section. + Revision 1.115 2002/05/16 16:25:00 oes Extended the Filter File chapter & minor fixes -- 2.39.2