John Peter Dinesh
Wednesday, October 12, 2011
Escape regex characters in string match
$rex = qr{\Q(hi/\E}is;
my $string='(Hi/';
if($string=~m/$rex/is)
{
print "Matched\n";
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment