http://www.perlmonks.org?node_id=718944


in reply to Regular expression help

Hi

Please take a note about the regular expressions here http://perldoc.perl.org/perlretut.html and do you want something like this?

use strict; my $string = "Required Not_Required Not_Required Required"; while($string=~/\bRequired\b/gi){ print "$&\n";##Here it will print only required text with non word + character before and after }

Punitha