#!/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;
In reply to Re^4: How to use \W in Regular Expression?
by Sachin
in thread How to use \W in Regular Expression?
by Sachin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |