in reply to Slurping file using regular expressions for array or variables
Your MAC address code should read
or more concisely,/([\dA-Fa-f]{2}:[\dA-Fa-f]{2}:[\dA-Fa-f]{2}:[\dA-Fa-f]{2}:[\dA-Fa-f]{2 +}:[\dA-Fa-f]{2})/g);
The code you posted (I think) was looking for literal '2's instead of a count ({2}). See Quantifiers in perlre./([\dA-F]{2}(?::[\dA-F]{2}){5})/ig);
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|