Regex

zio.parser.Regex
See theRegex companion object
sealed trait Regex

A model of a regular expression.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def &(that: Regex): Regex

Composes this regex with the specified regex using intersection, returning a regex that will match a prefix only if both this and the specified regex match it.

Composes this regex with the specified regex using intersection, returning a regex that will match a prefix only if both this and the specified regex match it.

Attributes

def atLeast(min: Int): Regex

Returns a new regex that matches at least min occurrences of this regex.

Returns a new regex that matches at least min occurrences of this regex.

Attributes

def atMost(max: Int): Regex

Returns a new regex that matches at most max occurrences of this regex.

Returns a new regex that matches at most max occurrences of this regex.

Attributes

def between(min: Int, max: Int): Regex

Returns a new regex that matches between min and max occurrences of this regex.

Returns a new regex that matches between min and max occurrences of this regex.

Attributes

Compiles the regex to a form that allows efficient execution on chunks of characters.

Compiles the regex to a form that allows efficient execution on chunks of characters.

Attributes

def toLiteral: Option[Chunk[Char]]

If the regex is a string literal, returns the string literal.

If the regex is a string literal, returns the string literal.

Attributes

def |(that: Regex): Regex

Composes this regex with the specified regex using union, returning a regex that will match a prefix only if either this or the specified regex match it.

Composes this regex with the specified regex using union, returning a regex that will match a prefix only if either this or the specified regex match it.

Attributes

def ~(that: Regex): Regex

Sequentially composes this regex with the specified regex, returning a regex that will first match this one, and then match the specified regex.

Sequentially composes this regex with the specified regex, returning a regex that will first match this one, and then match the specified regex.

Attributes