- 1

guess what this expression does

Var a = /^\w+([\.-]?\w+)*@w+([\.-]?\w+)*(\.\w{2,3})+$/; I didnt create it just remembered i used it in my high school web programming project a few years ago

26th Aug 2017, 1:10 PM
Elad Goldenberg
Elad Goldenberg - avatar
2 Respostas
+ 3
This expression does nothing by itself... It's a regular expression (not so well) designed to match email address (but will fail on four letters and more extended TLD -- Top Level Domain: the letters after dot in internet domain names -- and doesn't need the first backslash, as dot is explicit inside class of character -- between squared brackets).
26th Aug 2017, 3:17 PM
visph
visph - avatar