Hi I am trying to make a regular expression on validating phone numbers to start with 02 and be 10 digits(including the 02). This is what I have but it doesn't seem to be working:
/^02[0-9]{8}$/
Thanks for the help
Hi I am trying to make a regular expression on validating phone numbers to start with 02 and be 10 digits(including the 02). This is what I have but it doesn't seem to be working:
/^02[0-9]{8}$/
Thanks for the help
If I use the phone number 0234567891, a possible regex could be:
/^(02){1}[0-9]{8}$/
Ensure you match the '02' exactly once and then and 8 digits after.