Posted By

peceps on 10/15/10


Tagged

regex name variable


Versions (?)

Regex to check valid variable name


 / Published in: Java
 

  1. // check normal variable name
  2. if (!variableName.matches("^[a-zA-Z][a-zA-Z0-9]*?$")) {
  3. return variableName;
  4. }

Report this snippet  

You need to login to post a comment.