I have a text field which should be entering either 0-9 characters or exact string N/A. I am using this regex: /[\d]|\bN/A\b/ But this is not matching what I want:
What I Want is:
123534 - Match
N/A - Match
N/AN/A - no match
N - no match
NA - no match
N/A1234 - no match
134234N/A - no match
1234N - no match
My current regex /[\d]|\bN/A\b/ is matching above 6, 7 and 8 case which I don't want.
Here is the regex: ^(\d+|N\/A)$