Hello All, The following scripts works fine. But I have doubt in this.
$_="The quick black fox slavered over the dead dog # a bit macabre, no?"; $_ =~ m/^ # anchor at beginning of line The\ quick\ (\w+)\ fox # fox adjective \ (\w+)\ over # fox action verb \ the\ (\w+) dog # dog adjective (?: # whitespace-trimmed comment: \s* \# \s* # whitespace and comment token (.*?) # captured comment text; non-greedy! \s* # any trailing whitespace )? # this is all optional $ # end of line anchor /x; # allow whitespace print; I just modified the following line (?: # whitespace-trimmed comment: to (? # whitespace-trimmed comment: I got error. Why? Regs,Durai. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/24/2004 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>