Skip to content

Latest commit

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Build Status JavaVerbalExpressions

VerbalExpressions is a Java library that helps to construct difficult regular expressions - ported from the wonderful JSVerbalExpressions.

##Examples

VerbalExpressiontestRegex = newVerbalExpression ()
.startOfLine()
.then("http")
.maybe("s")
.then("://")
.maybe("www.")
.anythingBut(" ")
.endOfLine();
// Create an example URLStringurl = "https://www.google.com";
// Use VerbalExpression's testExact() method to test if the entire string matches// the regextestRegex.testExact(url); //TruetestRegex.toString(); // Ouputs the regex used: // ^(http)(s)?(\:\/\/)(www\.)?([^\ ]*)$VerbalExpressiontestRegex = newVerbalExpression ()
.startOfLine()
.then("abc")
.or("def");
StringtestString = "defzzz";
//Use VerbalExpression's test() method to test if parts if the string match the regextestRegex.test(testString); //truetestRegex.testExact(testString); //false

Other implementations

You can view all implementations on VerbalExpressions.github.io

About

Java regular expressions made easy.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages