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
In reply to Re: Re: Regular expressions
by aersoy
in thread Capturing text between literal string delimiters (was: Regular expressions)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |