MAC Address Validation using Client Script and Business Rule

selvambala
Tera Contributor

Hi

I have to validate MAC Address in CMDB using Client script and Business rule and format should be like this 00:0c:29:61:6d:37

how can I validate it by using RegEx.

Thanks,
Selvam Balakrishnan

6 REPLIES 6

Hi @selvambala 

 

Did my reply answer your question?

If my response helped please close the thread by marking the appropriate response as correct so that it benefits future readers.

 

Thanks and regards,

Kartik

Ian Mildon
Tera Guru

This regex is using uppercase letters, but that would be a quick edit to change them to lowercase:

var special_pattern = new RegExp("^([0-9-A-Z]{2}):([0-9-A-Z]{2}):([0-9-A-Z]{2}):([0-9-A-Z]{2}):([0-9-A-Z]{2}):([0-9-A-Z]{2})$");