google / openintent

Apache License 2.0
27 stars 3 forks source link

Mac address pattern regex #3

Closed benea11 closed 3 months ago

benea11 commented 1 year ago

Hey Jake, you mentioned about a regex pattern for a lowercase mac address following xx:xx:xx:xx:xx:xx format. Try this:

      "mac_address":{
         "type":"string",
         "pattern":"^([a-f0-9]{2}:){5}[a-f0-9]{2}$",
         "description":"MAC Address of an access_point.  Should be described in the format: 01:23:45:67:89:0a where is is 2 characters seperated by colons and  letters are lower case.\n"
      },

Looks to work when I run it through a regex tester, https://regex101.com/r/bcbtmz/1

jsnyder81 commented 11 months ago

This should be included in 1.0.0 branch.