Anaemelerma
New Member
Hi I need to validate password for only alphanumeric chars( should present both alphabets and numbers from 0..9) . I mean it should contain at least one digit and remaining alphabetsThe regex I use is like this : \[code\] <xsd:simpleType name="PasswordType"> <xsd:restriction base="xsd:string"> <xsdattern value="http://stackoverflow.com/questions/12502606/?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{8,20})$"/> </xsd:restriction> </xsd:simpleType>\[/code\]but eclipse complains the error : InvalidRegex: Pattern value '?!^[0-9]$)(?!^[a-zA-Z]$)^([a-zA-Z0-9]{8,20})$' is not a valid regular expression. The reported error was: 'Unexpected meta character.'.Could anybody help how to solve this issue?Thanks