That will match just the number 1, and not 11, or 111, etc.
It matches "1" and "1\n" only.
/^1$/:
/^1\z/ will only match "1".
In reply to Re^3: REGEX Match Single Digit
by ikegami
in thread REGEX Match Single Digit
by spickles
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |