I need to create a regular expression that matches a process number that has the following pattern #######-##.####.7.09.0009 where # means numbers from 0 to 9. Here is what I came up with after some research:
var regex = new RegExp("^[0-9]{7}[\-][0-9]{2}[\.][0-9]{4}[\.7\.09\.0009]$");
I also tried:
- /^[0-9]{7}\-[0-9]{2}\.[0-9]{4}\.7\.09\.0009$/
- /^[0-9]{7}\\-[0-9]{2}\\.[0-9]{4}\\.7\\.09\\.0009$/
[\.7\.09\.0009]in square brackets or else it would mean a character class.new RegExp(String)