I am using a regular expression which gets the substring associated with a match i.e
"(MAC:[A-Z0-9]{12})"
This regex will find the occurences of MAC:(Some characters) in a string. This regex is working for characters less than 10 i.e
"(MAC:[A-Z0-9]{8})" - WORKS
but,
"(MAC:[A-Z0-9]{8})" - THROWS EXCEPTION
Any help appreciated regarding the same.
EDIT: I use something like this:
MatchCollection macName = Regex.Matches(otherdata,
@"(MAC:[A-Z0-9]{10})+",
RegexOptions.IgnoreCase);
To extract the characters after MAC:
"ADMIN:1EXT:0NOR:0OUT:1PRI:1BAT:1MOD:1MAC:BFEBFBFF000006FB00:1E:37:54:AE:C8"
I should get the string after using the regex:
MAC:BFEBFBFF000006FB00:1E:37:54:AE:C8
I hope I have explained myself clearly.