Efficient regular expression pattern ?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,

I'm building an application that analyse a flow of url in order to detect
some pages.
I've a very huge list of regular expressions (up to several thousands) that
I have to check on all urls.

Each regular expression will be evaluated agains all urls.

How can I write the code in order to be the most efficient ?

My fisrt idea is to create a List<Regex> that I populate once, and each time
an url is incoming, I do a foreach(Regex r in Regexs).

But I'm afraid this process is quite slow since urls can input up to
10/seconds.

I'd apreciate any comments or suggestions.

Thanks,
Steve


.



Relevant Pages

  • Re: FORK/JOIN Re: DOER/MAKE and Thinking Forth again
    ... how you handle regular expressions. ... test a rose is a rose is a rose ok ... So what happens in term of control flow, ... M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html ...
    (comp.lang.forth)
  • Re: Construction of a non-regexable subset of the set of all strings
    ... I have a question which I am afraid might seem "overly scientific" (not ... If we look at the set S of all finite strings, then each regex ... Are you talking about regular expressions in general or only Perl's regular ...
    (comp.lang.perl.misc)
  • Re: sorting in PHP.
    ... afraid to get into trouble later since I'm not familiar with RE yet. ...    I highly recommend to learn regular expressions because this is very ... useful tool for parsing any complex string data. ...
    (comp.lang.php)
  • Re: sorting in PHP.
    ... afraid to get into trouble later since I'm not familiar with RE yet. ... I highly recommend to learn regular expressions because this is very useful tool for parsing any complex string data. ... And don't afraid to use it - in the case of problems here is enough peoples in the world to help you. ...
    (comp.lang.php)
  • Re: regex
    ... Greg Martin writes: ... I'm afraid I know little about regular expressions. ... This should work with perl, but in C/C++ you need to quote the ...
    (comp.unix.programmer)