03-26-2009 01:10 PM
I have device that returns multi line response where I need to extract hex number in this patten f01a.ad70.db84
The hex number will chamge, but will be in same patten (FFFF.FFFF.FFFF)
Thanks you.
Solved! Go to Solution.
03-26-2009 01:16 PM
03-26-2009 01:42 PM - edited 03-26-2009 01:43 PM
Exactly,
03-26-2009 02:02 PM
Both of thank you for your help and point me right deriction.
Because of multi line and muti number, I had to change little bit.
Let me know if there is easier way...
Thank you again.
03-26-2009 03:33 PM
03-26-2009 03:53 PM
Hello smercurio_fc, thank you for help.
I am attaching Test VI. What I was looking for is way to extract hex number; in this case I was able extract IP address that get return in message. This was easy because they are in decimal format, so I made a match pattern “[0-9]+[.][0-9]+[.]+[0-9]+[.][0-9]+” (ie 10.10.10.10). But I wasn’t sure how to make pattern for hexadecimal number, I need to extract MAC Address as well; so I ask the question.
Is there a easy way to make match pattern?
Something like [0-9]or[a-f]+[.] [0-9]or[a-f]+[.] [0-9]or[a-f]+[.]
03-26-2009 04:22 PM - edited 03-26-2009 04:22 PM
I tried removing all the "enters" with a "space" to make it one line. Then I just kept passing the remaining string through a shift register. Not sure if its more simple, just another way to do it.
03-26-2009 04:43 PM
Thank you for help.
I was able to just extract the hexadecimal number by have pattern [0-9|a-f]. "[0-9|a-f]+[.][0-9|a-f]+[.][0-9|a-f]+"
This way I don't have worry about if any other data come between ip and mac address.
Thank you again for help.
🙂
03-26-2009 05:01 PM - edited 03-26-2009 05:02 PM
You can also use Match Regular Expression to find your hex string:
03-26-2009 05:29 PM
Excellent!
Thank you very much