Reputation: 134
set modelList [lsearch -nocase -all -regexp -inline $args {(LAP|CAP)?[0-9]{2,5}}]
My this line of code is also matching mac address of format 7081.05e7.ba70
, What am I missing. Please help.
Upvotes: 0
Views: 71
Reputation: 39443
(LAP|CAP)?
is optional in your regex as you placed a ?
at there.
So your regex matches all of the followings:
LAP0123
CAP012
012
01234
Upvotes: 3