in reply to Re: Regular expressions
in thread Capturing text between literal string delimiters (was: Regular expressions)
Hello,
I think your Regular Expression is unnecessarily complex. Besides it chokes on a string like this: "sp Hello there! spelling spoiler spooky asp wizard! sp \n Hey hey sp How are you? sp".
A simpler and better solution would be
@result = split /\bsp\b/, $string;
(where b is for boundary)
--
Alper Ersoy
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Regular expressions
by broquaint (Abbot) on Jun 24, 2002 at 13:21 UTC | |
by aersoy (Scribe) on Jun 24, 2002 at 13:48 UTC |