guess what this expression does | Sololearn: Learn to code for FREE!

-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

8/26/2017 1:10:53 PM

Elad Goldenberg

2 Answers

New Answer

+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).