regexp

package module
v0.0.0-...-386f3d5 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: MIT Imports: 2 Imported by: 0

README

Regexp

Go Report Card GoDoc

A simple golang regexp implementation. Implemented to learn about regexps. Uses NFAs. Not all features implemented.

Documentation

Overview

Package regexp is a basic regexp library.

The library was implemented to explore regexp parsing and NFA representation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Regexp

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

Regexp is a compiled regular expression.

func Compile

func Compile(pattern string) (r *Regexp, err error)

Compile compiles a pattern into Regexp.

func MustCompile

func MustCompile(pattern string) *Regexp

MustCompile invokes Compile and panics if an error is returned.

func (*Regexp) MatchString

func (r *Regexp) MatchString(input string) bool

MatchString returns true if the the passed input matches the pattern.

Jump to

Keyboard shortcuts

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