GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - suchintan/JavaVerbalExpressions: Java regular expressions made easy.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

24 Commits
24 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Build Status JavaVerbalExpressions

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

##Examples

VerbalExpression testRegex = new VerbalExpression.Builder()
	           					 .startOfLine()
	           					 .then("http")
	           					 .maybe("s")
	           					 .then("://")
	           					 .maybe("www.")
	           					 .anythingButNot(" ")
	           					 .endOfLine()
	           					 .build();

// Create an example URL
String url = "https://www.google.com";

// Use VerbalExpression's testExact() method to test if the entire string matches
// the regex
testRegex.testExact(url); //True

testRegex.toString(); // Ouputs the regex used: 
					  // ^(http)(s)?(\:\/\/)(www\.)?([^\ ]*)$

VerbalExpression testRegex = new VerbalExpression.Builder()
                                 .startOfLine()
                                 .then("abc")
                                 .or("def")
                                 .build();

String testString = "defzzz";

//Use VerbalExpression's test() method to test if parts if the string match the regex
testRegex.test(testString); //true
testRegex.testExact(testString); //false

Other implementations

You can view all implementations on VerbalExpressions.github.io

  • Javascript
  • PHP
  • Python
  • C#
  • Objective-C
  • Ruby
  • Groovy
  • Haskell
  • C++

About

Java regular expressions made easy.

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.