I am using .NET Core's client side validation to validate user input based on a regular expression.
The following is a regular expression that accepts 3 letters 'AAA' and 7 digits:
data-val-regex-pattern="^AAA\d{7}\b"
I want to make it case insensitive, so the user can type 'AAA' or 'aaa' and get the same result, but cannot find a way to do so.
I have tried:
But nothing has worked.
Can anyone please explain how to make an unobtrusive JavaScript regex case insensitive?
This regex should match the stated criteria: ^[A-Za-z]{3}\d{7}\b
Can you provide some example data of what should and shouldn't be matched to confirm?
Great explanation of the pattern courtesy of RegEx101: