What is a regular expression for a WPA-bssid

705 Views Asked by At

is this format ?

wpa-bssid 00:1a:2b:3c:4d:5e

or

wpa-bssid 00:12:26:36:48:58

can I use this regex?

^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$

any help woulb be appreciated

1

There are 1 best solutions below

1
On BEST ANSWER

Its OK and more precise you can use :

([0-9A-F]{2}([:-]|$)){6}