I want a java regular expression, that can be used to match this text:
variable(X)
.
The X
can be any string, that only contains characters a-z
,A-Z
,0-9
.
But the rules are, X != tab
and X != foo
.
Also the X
cannot be empty string.
Also X
must begin with a a-z
character.
So far I have variable\([a-z]([a-zA-Z]|\d)*\)
, but I don't know how to write the not equals to part...