This would be my choice:~/^(y|yes)$/i
matches y or yes without any regard to case and doesn't store the match in $1 unnecessarily. TMTOWTDI~/^(?:y(?:|es))$/i;
In reply to Re: prompting a user for input
by s0ttle
in thread prompting a user for input
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |