Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The code above isn't working because in both cases it match the digits it finds.if($u=~/\d{4}?/){$u=~s/\d\d\d\d/00$u/;} if($u=~/\d{5}?/){$u=~s/\d\d\d\d\d/0$u/;}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regular Expression Help
by davidrw (Prior) on Jun 28, 2005 at 17:48 UTC | |
|
Re: Regular Expression Help
by Transient (Hermit) on Jun 28, 2005 at 17:46 UTC | |
by Anonymous Monk on Jun 28, 2005 at 17:53 UTC | |
by Transient (Hermit) on Jun 28, 2005 at 17:58 UTC | |
by Anonymous Monk on Jun 28, 2005 at 18:01 UTC | |
|
Re: Regular Expression Help
by kirbyk (Friar) on Jun 28, 2005 at 17:50 UTC | |
|
Re: Regular Expression Help
by Forsaken (Friar) on Jun 28, 2005 at 17:50 UTC |