regex

package
v0.7.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: EPL-1.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package regex exposes JVM-faithful java.util.regex equivalents for code running on glojure. Static methods (Pattern/compile, Pattern/matches, Pattern/quote) and Pattern flag constants are published through pkgmap under both the bare "Pattern." prefix and the fully qualified Go path. Instance methods on *Pattern and *Matcher (matcher, find, group, ...) are reached at runtime through lang.FieldOrMethod, which dispatches via reflection on the receiver; the gojava regex package uses capitalized, variadic method signatures so the JVM's overloaded forms collapse to a single Go method per name.

Index

Constants

View Source
const (
	CASE_INSENSITIVE = jregex.CASE_INSENSITIVE
	MULTILINE        = jregex.MULTILINE
	LITERAL          = jregex.LITERAL
	DOTALL           = jregex.DOTALL
	UNICODE_CASE     = jregex.UNICODE_CASE
)

Variables

This section is empty.

Functions

func Compile

func Compile(args ...any) *jregex.Pattern

Compile mirrors Pattern.compile(String). Single-arg form; the flag-aware overload is reached via CompileFlags.

func IsPattern added in v0.7.6

func IsPattern(value any) bool

func IsPatternCompat added in v0.7.6

func IsPatternCompat(value any) any

func Matches

func Matches(args ...any) bool

Matches mirrors Pattern.matches(regex, input): convenience for a one-shot whole-input match.

func Quote

func Quote(args ...any) string

Quote mirrors Pattern.quote: returns a literal pattern.

func ReplaceAll added in v0.7.6

func ReplaceAll(pattern any, input, replacement string) string

func ReplaceAllCompat added in v0.7.6

func ReplaceAllCompat(pattern, input, replacement any) any

func TranslateJavaPattern added in v0.7.6

func TranslateJavaPattern(pattern string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL