It doesn't pertain to your question but the code:
$string =~ /^[smtwhfa]*$/The * is zero or more, not one or more. For one or more use the + sign. (So it would be /^[smtwhfa]+$/) Unless instead of saying
"A user supplied string may contain 1 or more of the characters smtwhfa in any order."you really meant zero or more. Just a frequent mistake some people make that I thought I would point out.
In reply to Re: Regex (lookahead) Confusion
by MCS
in thread Regex (lookahead) Confusion
by ChrisR
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |