in JAVA

Java – pattern

[sourcecode language=”java”]
Pattern p = Pattern.compile("^[0-9a_zA-Z]{1,3}$");
Matcher m = p.matcher("Z0");
boolean b = m.matches();

if (b) System.out.println("ok");
else System.out.println("oh no!!");
[/sourcecode]

Write a Comment

Comment