in reply to Re: Regular Expression Question
in thread Regular Expression Question
print "$1\n" if /^(\w+[\w,]+\w+)$/ && !/,,/;
So, if I wanted to check for more than 2 consecutive commas (I should have mentioned that in the original post) I would do the following:
print "$1\n" if /^(\w+[\w,]+\w+)$/ && !/,{2,}/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Regular Expression Question
by kesterkester (Hermit) on Dec 04, 2003 at 21:35 UTC | |
by kesterkester (Hermit) on Dec 04, 2003 at 21:41 UTC |