In my application edittext value need at least one digit and one alphabet is mandatory, and some special characters are optional i.e ".-", like any whare in the string. For example ram123-. or r_m-12.m or .--ram123 or ram123.-_. For this I need regex. I have already tried with this one
str_userId.matches("[A-Za-z0-9]*+[?.?_?-]")
But not working. Here how to add special characters are optional.
Thanks, In Advance