Documentation
¶
Overview ¶
Package regexp implements regular expression search tuned for use in grep-like programs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Grep ¶
type Grep struct { Regexp *Regexp // regexp to search for Stdout io.Writer // output target Stderr io.Writer // error target L bool // L flag - print file names only C bool // C flag - print count of matches N bool // N flag - print line numbers H bool // H flag - do not print file names V bool // V flag - print non-matching lines (only for cgrep, not csearch) HTML bool // emit HTML output for csweb Match bool // were any matches found? Matches int // how many matches were found? Limit int // stop after this many matches Limited bool // stopped because of limit PreContext int // number of lines to print after PostContext int // number of lines to print before // contains filtered or unexported fields }
TODO:
type Regexp ¶
Regexp is the representation of a compiled regular expression. A Regexp is NOT SAFE for concurrent use by multiple goroutines.
func Compile ¶
Compile parses a regular expression and returns, if successful, a Regexp object that can be used to match against lines of text.
func (*Regexp) MatchString ¶
Click to show internal directories.
Click to hide internal directories.