You don't need the parentheses, but you do need more square brackets. Character classes have the same characteristics as individual characters. Just as you might search for vowels like this: [aeiou], or digits like this: [0123456789] or this: [0-9], you need to enclose a class such as [:digit:] or [:upper:] in a bracket expression as well: [[:xdigit:]] (hex digits).