package
1.24.4
Repository: https://pkg.go.dev/std
Documentation: pkg.go.dev

# Packages

Package syntax parses regular expressions into parse trees and compiles parse trees into programs.

# Functions

Compile parses a regular expression and returns, if successful, a [Regexp] object that can be used to match against text.
CompilePOSIX is like [Compile] but restricts the regular expression to POSIX ERE (egrep) syntax and changes the match semantics to leftmost-longest.
Match reports whether the byte slice b contains any match of the regular expression pattern.
MatchReader reports whether the text returned by the [io.RuneReader] contains any match of the regular expression pattern.
MatchString reports whether the string s contains any match of the regular expression pattern.
MustCompile is like [Compile] but panics if the expression cannot be parsed.
MustCompilePOSIX is like [CompilePOSIX] but panics if the expression cannot be parsed.
QuoteMeta returns a string that escapes all regular expression metacharacters inside the argument text; the returned string is a regular expression matching the literal text.

# Structs

Regexp is the representation of a compiled regular expression.