Thanks Guys this is good however what does character class inside the square brackets mean.. I think I need to get mastering regular expressions book..
Mandar > > while (/(susan[^.?!]+the\s+water\b)/ig) { > print $1,"\n"; > } > > Jenda > ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== > When it comes to wine, women and song, wizards are allowed > to get drunk and croon as much as they like. > -- Terry Pratchett in Sourcery > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>