[Adzapper-devel] Re: please help me with parsing patterns
Brought to you by:
cs1
From: Cameron S. <cs...@zi...> - 2002-11-15 06:19:17
|
On 13:34 14 Nov 2002, 6czY0SD7ydDJw8nO <il...@ch...> wrote: | On Thu, 14 Nov 2002, ???? ??????? wrote: | > adzap uses patterns which are not regexp-compatible. Is there a way to | > parse them to regexp ones ? | | oops, thanks everybody, I've figured out how to make generic regexp from | adzap patterns. I actually need to add a --dump and --dump-regexp option to the redirector to emit the patterns in the raw and as regexps (the script already has the knowledge because it has to turn the patterns into perl regexps anyway). The pattern syntax is as it is because it's a better match (egronomicly) for URLs than a regexp. There is a paragraph in the web page about the pattern syntax. | I wonder how those regexp can be optimized ? | is it really necessary to have "http://" prefix everywhere ? Well, perhaps not, except that I have yet to see an ftp:// ad URL, yet plenty of people go through a proxy to get at ftp: URLs. Indeed, my own httpget program and the classes it depends on don't speak FTP at all and expect a proxy to do it. Optimisation is definitely one of the things we should be thinging about. The pattern space usually only grows and rarely shrinks, and never shrinks by much. So efficiency will start to be an issue sometime. For people with zappers on low end hardware but busy user bases it may already be an issue. -- Cameron Simpson, DoD#743 cs...@zi... http://www.zip.com.au/~cs/ Loud pipes make noise. Skill and experience save lives. - EdBob Morandi |