Skip to content

noah1400/JRB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JRB

JRB (Java Regex Builder) is a Java version of SimpleRegex/SRL

Email validation

String query = JRB.builder()
        .startsWith()
        .anyOf(
            JRB.builder().digit().letter().oneOf("._%+-")
        ).onceOrMore()
        .literally("@")
        .anyOf(
            (Builder builder) -> {
                builder
                .digit()
                .letter()
                .oneOf(".-");
            }
        ).onceOrMore()
        .literally(".")
        .letter().atLeast(2).mustEnd().caseInsensitive()
        .get();

Outputs

/^(?:\d|[a-z]|[\._%\+\-])+(?:@)(?:\d|[a-z]|[\.\-])+(?:\.)[a-z]{2,}$/i

Using the Language:

starts with digit between 3 and 5 times, letter twice, must end, multi line, case insensitive

Outputs:

/^\d{3,5}[a-z]{2}$/mi

About

Regex Builder for Java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages