04-03-2013 02:06 PM
Hi Everyone,
I have a problem with the Match Regular Expression function,
I am trying to parse the response two a arp -a 192.168.0.15 request in order to extract MAC address of this remote IP, I used the following RegEx: ^([0-9a-fA-F]{2}[:-]){5}([0-9a-fA-F]{2})$
I am wondering why do I need to do a string subset first to extract only the MAC Address part. Isn't Match Regular Expression function capable of recognizing the RegEx directly in the middle of a string?
I only works when I extract the right tring subset as in the picture bellow.
Thanks for your answers.
Solved! Go to Solution.
04-03-2013 02:17 PM
Get rid of the "^" in the beginning of your regular expression. You are instructing it to find the pattern at the beginning of the string.
04-03-2013 02:45 PM
Hi Mark,
Thanks a lot for your answer, I did what you said, and I still see no change.
the answer from arp -a is :
Interfaz: 192.168.0.16 --- 0xb
Direcci¢n de Internet Direcci¢n f¡sica Tipo
192.168.0.15 00-04-7e-02-21-10 din mico
and the whole match output gives nothing ""
OK found the answer I also must quit the $ at the end,
Thanks a lot Mark,
Have a great day
04-03-2013 02:52 PM - edited 04-03-2013 02:53 PM
Sorry, I should have noticed the "$" as well. Glad it is working for you.