Skip to content

palyfight/SimpleRegexApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java CI with Maven codecov Quality Gate Status

SimpleRegexApi

A very simple java api to handle a few common regex patterns. Simply create a regex pattern object and use it to match against a String

Usage

Prebuilt patterns

PatternFactory pf = new PatternFactory();
RegexPattern rp = pf.getPattern(PatternType.ENUM);
rp.match(your_string);

Custom pattern

PatternFactory pf = new PatternFactory();
RegexPattern rp = pf.getPattern("valid_regex_pattern");
rp.match(your_string);

Supported methods

  • match() - returns a List of all matches found
  • matchFound() - returns True if at least 1 match was found
  • countMatches() - returns a count of all matches found