The documentation is live and interactive powered by the klipse plugin:
First let's load VerEx
from the JSVerbalExpressions CDN.
Here is the JSVerbalExpressions Github repository.
VerEx.toString()
test
matches a Regexp.
var tester = VerEx()
.startOfLine()
.then('http')
.maybe('s')
.then('://')
.maybe('www.')
.anythingBut(' ')
.endOfLine();
// Create an example URL
var testMe = 'https://www.google.com';
// Use RegExp object's native test() function
tester.test(testMe)
find
and replace
for string manipulation.
VerEx().find('red').replace('We have a red house', 'blue');