lundi 14 septembre 2015

Checking of alphabets in String to appear at least once using Java String Regex?

I'm using this regex to check all the alphabets.

String regex = "(?i)(?=.*a)(?=.*b)(?=.*c)(?=.*d)(?=.*e)(?=.*f)(?=.*g)(?=.*h)(?=.*i)(?=.*j)(?=.*k)(?=.*l)(?=.*m)(?=.*n)(?=.*o)(?=.*p)(?=.*q)(?=.*r)(?=.*s)(?=.*t)(?=.*u)(?=.*v)(?=.*w)(?=.*x)(?=.*y)(?=.*z).*
"

Example:

"The quick brown fox jumps over the lazy dog" contains all the english alphabets but my regex is not working?

What I'm doing wrong, or is there any other way to check for pangrams.

Aucun commentaire:

Enregistrer un commentaire