in reply to Match Optional Groups with 1 Required Group
print "$_: ", m[^\w+(?:\.\w+){0,2}$] ? 'matched' : 'failed' for qw[ one one.two one.two.three one. one-two ];; one: matched one.two: matched one.two.three: matched one.: failed one-two: failed
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Match Optional Groups with 1 Required Group
by rem45acp (Novice) on Feb 04, 2014 at 00:48 UTC | |
by BrowserUk (Patriarch) on Feb 04, 2014 at 00:52 UTC | |
|
Re^2: Match Optional Groups with 1 Required Group
by rem45acp (Novice) on Feb 04, 2014 at 00:49 UTC | |
by rem45acp (Novice) on Feb 04, 2014 at 00:56 UTC |