The most literal version would be:
Code:
local name = tostring(Name)
if name:match("EXP1") or name:match("EXP2") then
...
Note that the []s you had will mess it up, as they define a set of characters to match rather than a phrase - [EXP1] would match E, X, P, or 1. If you specifically want to match the phrase with []s you need to use
%[ and
%] to tell it that you mean the actual character.
However, if your ranks are all in the same format we can simplify things:
Code:
if tostring(Name):match("EXP%d+") then
%d means "any digit" and the
+ says "match one or more of this".