Re: regular expression problem ? and * characters
- From: Eric Bohlman <ebohlman@xxxxxxxxxx>
- Date: 30 May 2006 02:15:55 GMT
"compboy" <compboyxyz@xxxxxxxxx> wrote in news:1148814168.551306.197780@
38g2000cwa.googlegroups.com:
Im writing a perl script now and this is part of the sricpt
chomp = ($pattern = ARGV[0]);
for each(@thisarray)
{
if($_ =~ m/$pattern/i)
{
print ("found it here, $_");
}
}
No it isn't. That's not Perl. It won't compile.
Please show your actual code, not something that "looks like it."
my question is how do you imporve it so it can accept the input that
contains* and ?
character(s) like *ab? a*b* *a*
perldoc -f quotemeta
.
- References:
- regular expression problem ? and * characters
- From: compboy
- regular expression problem ? and * characters
- Prev by Date: Term::Cap -- Setting terminal type under Windows XP
- Next by Date: Installing mod-perl on Tiger (OSX) issues
- Previous by thread: Re: regular expression problem ? and * characters
- Next by thread: combining graphs from GD::Graph in one image file
- Index(es):
Relevant Pages
|