in reply to Help with negative look ahed
Please use markup for formatting.
Furthermore you could make your regex much clearer by using the x-flag, adding comments and outsourcing parts into well named variables, something like this:
$item = '(?:Item|ITEM)[Ss]?'; $punctuation = '(?:\.|\-|\:|\-|\,)'; m/ $item \s? $punctuation ... /x;
don't be too surprised if you can answer your question on your own after refactoring the code! ;-)
Cheers Rolf
|
|---|