Friday, March 2, 2012

Pattern easy

This is very is and amazing if you know

ex) if(split[i].matches("[A-Za-z]+\\.?")){
    }

what dose that mean?

i'm just looking for JAVA API

[A-Za-z] : those alphabet A from Z or a-z is available
 +       [A-Za-z] uses more than one time
\\
.?       : .? means one or nothing  


"33. "             return false
"gefefeddd."       return true
"ddddfedAE"        return true
"d.d.d"            return false
"ddkdkjeij.33412"  return false
"12312tjkjkd@#"    return false

1 comment: