How can I write a regular expression that would accept only alphanumeric chars and the string's length be 0 or 8? What i managed to do until now is
^[a-zA-Z0-9]{0-8}$
Which verifies that my string contains only alphanumeric chars but still allows any string of length between 0 and 8. Is there any way to separate it in either {0} || {8} (in same regex)