in reply to Re^3: How to use \W in Regular Expression?
in thread How to use \W in Regular Expression?
#!/usr/bin/perl -W $str = <STDIN>;# suppose $str = "i am perl: a system"; chomp($str); $query = <STDIN>;# suppose $query = 'perl'; chomp($query); #$query = "perl"; $str =~ s/$query\W+/<em>$query<\/em> \W+/ig; print " Value = " . $str;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to use \W in Regular Expression?
by ikegami (Patriarch) on Dec 30, 2009 at 12:37 UTC | |
|
Re^5: How to use \W in Regular Expression?
by almut (Canon) on Dec 30, 2009 at 12:36 UTC | |
|
Re^5: How to use \W in Regular Expression?
by AnomalousMonk (Archbishop) on Dec 30, 2009 at 13:10 UTC | |
by ikegami (Patriarch) on Dec 30, 2009 at 14:25 UTC | |
by AnomalousMonk (Archbishop) on Dec 31, 2009 at 21:44 UTC |