java - How can i write the validation for number+string? -


i stuck small problem. think in java can write validation want smart logic.

in registration page there name field.

name should rahul0533 not 0533rahul..

for wrote logic getting first char in string , check.i think huge. please how can validate.

here in name field , name should not start special characters , numbers. remaining accepted.

try use regex validation

string name = "client name"; string patternstring = ""; // regexp pattern pattern = pattern.compile(patternstring); matcher matcher = pattern.matcher(name); 

regex basic syntax http://tutorials.jenkov.com/java-regex/syntax.html


Comments

Popular posts from this blog

c - CUDA code not processing if block properly -

oracle11g - get root domain from url Oracle sql regex_substr -

xcode - Swift Playground - Files are not readable -