Aria Automation and REGEX

October 16, 2023 0 By Allan Kjaer

We can use REGEX in the Cloud Template or in the forms in the Service Broker.

Where you prefer to do it, depends on where you want to check, if you put this into the Cloud Template, this will be enforced in the Service Broker and require you to update the Cloud Template to change them, and do a new release. I prefer to do it in the Forms but that is a personal Preference.

here are some examples of REGEX that I am using at Customers or in the LAB.

MAC Address with "-" separator;
^[a-fA-F0-9]{2}(-[a-fA-F0-9]{2}){5}$
MAC Address with ":" separator:
^[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){5}$
MAC Address with ":" or "-" separator:
^([a-fA-F0-9]{2})(((:[a-fA-F0-9]{2}){5})|((-[a-fA-F0-9]{2}){5}))$


IPv4 Address:
^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$

I will try to update the list in the future.

Please share this page if you find it usefull: