That matches "SB00\n" and you said it shouldn't. Replace /$/ with /\z/ to get the stated desired behaviour.
\d can match more than 0-9. I presume you don't want to match arab digits.
That uses needless captures. Get rid of them.
should bem/^(SB)(\d{1,2})$/i
m/^SB[0-9]{1,2}\z/i
In reply to Re^3: Noob Question - not sure what's wrong
by ikegami
in thread Noob Question - not sure what's wrong
by vishi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |