VerbalExpressions: Meaningful Regular Expressions
“VerbalExpressions is a JavaScript library that helps to construct difficult regular expressions.”
Basically, to test for a valid URL, this is the code required:
var tester = VerEx()
.startOfLine()
.then( "http" )
.maybe( "s" )
.then( "://" )
.maybe( "www." )
.anythingBut( " " )
.endOfLine();
This library is based on JavaScript but is currently being ported to many more languages. New is Objective-C, this wasn’t here on Friday.