VerbalExpressions – JavaScript library that helps construct regular expressions
github.com
github.com
^https?://(?:www\.)?[^ ]*$
is way more succinct and just as easy to read as: .startOfLine()
.then( "http" )
.maybe( "s" )
.then( "://" )
.maybe( "www." )
.anythingBut( " " )
.endOfLine();
Well... assuming you know regular expressions. Which you should if you are a programmer.I also don't use them often enough to commit all the rules to memory.
However, given VerbalExpressions, I don't think I'd have a problem building regular expressions. For a newbie, startOfLine and endOfLine is far more memorable than "^" and "$".
> Which you should if you are a programmer.
You can be pretty productive programmer without knowing regular expressions. Depends on the kind of programming you do really.
Implying this is?