I have to create a regex to validate ticket string in correct format.
Ticket format:
SFHD00002523003
It starts with four alphabets and ends with 12 numeric characters.
This is my code in my angular controller:
var pattern = new RegExp('[A-Z]{4}\\d{12}$');
console.log(pattern.test('SFHD00002523003');
Unfortunately, it is returning false for correct string, too.
var pattern = /^[A-Z]{4}\d{12}$/;@and then the user name without spaces to make sure the user is notified. I came back here by chance. Posted as an answer.