I need to match a pattern where i can have an alphanumeric value of size 4 or an empty value. My current Regex
"[0-9a-z]{0|4}");
does not works for empty values.
I have tried the following two patterns but none of them works for me:
"(?:[0-9a-z]{4} )?");
"[0-9a-z]{0|4}");
I use http://xenon.stanford.edu/~xusch/regexp/ to validate my Regex but sometimes i get stuck for RegEx. Is there a way/tools that i can use to ensure i have to come here for very complex issues.
Examples i may want to match: we12, 3444, de1q, {empty} But not want to match : @$12, #12q, 1, qwe, qqqqq
No UpperCase is matching.