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

Comments

Post a Comment

Popular posts from this blog

Project euler 169 found clue

Floyd-Warshall's algorithm