Socrates440 has asked for the wisdom of the Perl Monks concerning the following question:
*Ignore the response in the if statement. That was from an earlier program and I Just realized that I haven't updated it to say "Your string has zero or more \s and zero or more *s"#!/usr/bin/perl -w use strict ; while (<>) { if ($_ = /\\*\**/) { print "Your string has at least one a and any number of bs.\n" + ; last ; } else { print "Your string does not match.\n" ; last ; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regular expression queston
by state-o-dis-array (Hermit) on Jun 19, 2012 at 22:32 UTC | |
by roboticus (Chancellor) on Jun 19, 2012 at 22:39 UTC | |
|
Re: Regular expression queston
by roboticus (Chancellor) on Jun 19, 2012 at 22:31 UTC | |
|
Re: Regular expression queston
by NetWallah (Canon) on Jun 19, 2012 at 22:37 UTC | |
by Socrates440 (Acolyte) on Jun 20, 2012 at 01:20 UTC | |
by NetWallah (Canon) on Jun 20, 2012 at 04:10 UTC | |
by Anonymous Monk on Jun 20, 2012 at 02:25 UTC | |
|
Re: Regular expression queston
by Anonymous Monk on Jun 20, 2012 at 08:38 UTC |