chuleto1 has asked for the wisdom of the Perl Monks concerning the following question:
I would like to know how to have match operator "match" the * as a char and not as an regexp operator. Current implementation interprets the * as a regexp operator.$line = "THIS TEXT HAS A * IN IT"; $theMatch = "THIS TEXT HAS A * IN IT"; if($theMatch =~ /$line/ ) { s/$line/$tag/g; }
thanks for you wisdom
edited: Mon Jul 29 20:29:42 2002 by jeffa - added code tags
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: regexp =~
by japhy (Canon) on Jul 29, 2002 at 18:05 UTC | |
Re: regexp =~
by redsquirrel (Hermit) on Jul 29, 2002 at 17:50 UTC | |
Re: regexp =~
by thelenm (Vicar) on Jul 29, 2002 at 17:50 UTC | |
Re: regexp =~
by talexb (Chancellor) on Jul 29, 2002 at 17:49 UTC | |
Re: regexp =~
by kvale (Monsignor) on Jul 29, 2002 at 17:50 UTC | |
Re: regexp =~
by BrowserUk (Patriarch) on Jul 29, 2002 at 17:49 UTC | |
by Anonymous Monk on Jul 29, 2002 at 17:58 UTC | |
Re: regexp =~
by Nightblade (Beadle) on Jul 29, 2002 at 17:50 UTC |
Back to
Seekers of Perl Wisdom