Node.js examples for String:String Value
Check if a string is a valid id string
isId : function(s) { return this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$'); },/* ww w. j a v a 2s. c om*/ test : function(s, p) { s = s.nodeType == 1 ? s.value : s; return s == '' || new RegExp(p).test(s); }