speed up string matching

2004-09-23 Thread c r
Hi! I need to match an expression and its reverse to a very long string. When a match occurs all matching should stop and the position of the match should be returned. Question1: can I match the forward and reverse expression to the string on the same time and thereby save half the time it no

Re: speed up string matching

2004-09-23 Thread Gunnar Hjalmarsson
C R wrote: I need to match an expression and its reverse to a very long string. When a match occurs all matching should stop and the position of the match should be returned. Question1: can I match the forward and reverse expression to the string on the same time and You can make use of alternation

RE: speed up string matching

2004-09-23 Thread Thomas Bätzler
Hi, c r <[EMAIL PROTECTED]> asked: > I need to match an expression and its reverse to a very long string. > When a match occurs all matching should stop and the position > of the match should be returned. Could you please illustrate this with an example or two? Unless you specify the /g modifi

Re: speed up string matching

2004-09-23 Thread c r
c r <[EMAIL PROTECTED]> wrote:Thanks for replying! Are you certain that using the module makes the simultaneous matching faster than a sequential and to what degree (roughly)? Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: C R wrote: > I need to match an expression and its reverse to a very l

RE: speed up string matching

2004-09-23 Thread c r
c r <[EMAIL PROTECTED]> wrote:Thanks for replying! Thomas Bätzler <[EMAIL PROTECTED]> wrote: Hi, c r asked: > I need to match an expression and its reverse to a very long string. > When a match occurs all matching should stop and the position > of the match should be returned. Could you ple

Re: speed up string matching

2004-09-23 Thread Gunnar Hjalmarsson
[ Please 'bottom-post', i.e. type your reply below the quoted part of the message you are replying to. Also, don't quote the whole message, but only the part(s) needed for context. ] C R wrote: Gunnar Hjalmarsson wrote: C R wrote: Question2: is the "fork" function what I should use in order to matc

Re: speed up string matching

2004-09-23 Thread c r
Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > Gunnar Hjalmarsson wrote: >> C R wrote: >>> Question2: is the "fork" function what I should use in order to >>> match a string with multiple expressions simultaneously? >> >> Maybe, if the string is really, really log. You may e.g. want to >> check

Re: speed up string matching

2004-09-23 Thread Gunnar Hjalmarsson
C R wrote: Gunnar Hjalmarsson wrote: C R wrote: Are you certain that using the module makes the simultaneous matching faster than a sequential and to what degree (roughly)? Certain? Certainly not. :) It depends, among other things, on your systems ability to run parallel processes and on the size

Re: speed up string matching

2004-09-24 Thread c r
Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: C R wrote: > Gunnar Hjalmarsson wrote: >> C R wrote: >>> Are you certain that using the module makes the simultaneous >>> matching faster than a sequential and to what degree (roughly)? >> >> Certain? Certainly not. :) It depends, among other things,