Perl Monk, Perl Meditation | |
PerlMonks |
Regex \. helpby codz67 (Initiate) |
on Nov 21, 2014 at 23:57 UTC ( [id://1108062]=perlquestion: print w/replies, xml ) | Need Help?? |
codz67 has asked for the wisdom of the Perl Monks concerning the following question:
Oh great and wise monks, I beseech your help.
I have this regex: ^regex*\.0-9
It matches regex.1
It must also match regex, but not regex.abc. .
It seems as though the ? doesnt make the \. optional. Please help.
prints regex.1. I need it to print regex and regex.1:
Doesnt print anything. Shouldnt the ? match the . zero or more times? If so why doesnt it print regex and regex.1 As for the .abc I need that to be excluded when it greps. So regex.abc and regex.xyz wont print. Thank you for the help so far, I am still stuck on making this work. I will continue to try to make this work, if anyone could assist further I would be very thankful.
Back to
Seekers of Perl Wisdom
|
|