Movatterモバイル変換


[0]ホーム

URL:


lazyregexp

packagestandard library
go1.25.5Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License:BSD-3-ClauseImports:4Imported by:0

Details

Repository

cs.opensource.google/go/go

Links

Documentation

Overview

Package lazyregexp is a thin wrapper over regexp, allowing the use of globalregexp variables without forcing them to be compiled at init.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeRegexp

type Regexp struct {// contains filtered or unexported fields}

Regexp is a wrapper around regexp.Regexp, where the underlying regexp will becompiled the first time it is needed.

funcNew

func New(strstring) *Regexp

New creates a new lazy regexp, delaying the compiling work until it is firstneeded. If the code is being run as part of tests, the regexp compiling willhappen immediately.

func (*Regexp)FindAllString

func (r *Regexp) FindAllString(sstring, nint) []string

func (*Regexp)FindString

func (r *Regexp) FindString(sstring)string

func (*Regexp)FindStringSubmatch

func (r *Regexp) FindStringSubmatch(sstring) []string

func (*Regexp)FindStringSubmatchIndex

func (r *Regexp) FindStringSubmatchIndex(sstring) []int

func (*Regexp)FindSubmatch

func (r *Regexp) FindSubmatch(s []byte) [][]byte

func (*Regexp)MatchString

func (r *Regexp) MatchString(sstring)bool

func (*Regexp)ReplaceAllString

func (r *Regexp) ReplaceAllString(src, replstring)string

func (*Regexp)SubexpNames

func (r *Regexp) SubexpNames() []string

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp