pcre

package module
v0.0.0-...-6b37aa9 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

README

Perl Compatible Regular Expressions

pcre-8.42 without CGo. Handles UTF{8,16,32} and Unicode properties.

Supported operating systems and architectures
  • linux/amd64
  • linux/386

More OS/arch support is planned.

Installation

To install or update pcre

 $ go get [-u] modernc.org/pcre

Documentation: godoc.org/modernc.org/pcre

Documentation

Overview

Package pcre is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl, with just a few differences. Some features that appeared in Python and PCRE before they appeared in Perl are also available using the Python syntax, there is some support for one or two .NET and Oniguruma syntax items, and there is an option for requesting some minor changes that give better JavaScript compatibility.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option int

type Regexp

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

func Compile

func Compile(pattern string, options Option, tables Table) (*Regexp, error)

func MustCompile

func MustCompile(s string, options Option, tables Table) *Regexp

MustCompile is like Compile but panics if the expression cannot be parsed. It simplifies safe initialization of global variables holding compiled regular expressions.

func (*Regexp) Close

func (re *Regexp) Close()

func (*Regexp) Exec

func (re *Regexp) Exec(subject []byte, options Option, out []int32) (int, error)

func (*Regexp) FindIndex

func (re *Regexp) FindIndex(b []byte, options Option) (loc []int32, err error)

func (*Regexp) Fullinfo

func (re *Regexp) Fullinfo(what int32) (int32, error)

func (*Regexp) ReplaceAll

func (re *Regexp) ReplaceAll(b, repl []byte, options Option) (r []byte, err error)

type Table

type Table struct{ crt.Intptr }

Jump to

Keyboard shortcuts

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