All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.deplant.commons.regex.NoneOf Maven / Gradle / Ivy

The newest version!
package tech.deplant.commons.regex;

/**
 * Nonmatching lists are similar to matching lists
 * except that they match a single character not
 * represented by one of the list items.
 * You use an open-nonmatching-list operator (represented by `[^'(2)) instead
 * of an open-matching-list operator to start a nonmatching list.
 *
 * @param item An item is a character, a character class expression, or a range expression
 */
public record NoneOf(Word item) implements RegExpression {
	@Override
	public String build() {
		return String.format("[^%s]", item().build());
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy