in reply to Re: A challenging problem in perl regular expression
in thread A challenging problem in perl regular expression

ikegami, thanks a lot. but the last one doesn't work if there is more than 1 'JAZZ' in a string. I tried on "JAZZxxxxJAZZ" but the result was "JAZZaaaaaaaa".
  • Comment on Re^2: A challenging problem in perl regular expression

Replies are listed 'Best First'.
Re^3: A challenging problem in perl regular expression
by ikegami (Patriarch) on Jan 08, 2009 at 02:14 UTC

    It does work if there's more than one 'JAZZ' in the string, but it doesn't work if there's one at the end of the string. Scratch that one.

    The best test case is probably "JAZZxxJAZZJAZZxxJAZJAZZxxJAZZ"