/extractstatic

⚗️Extract static strings from regexp.

Primary LanguageGoMIT LicenseMIT

extractstatic

GoDoc CI Status Coverage Status Go Report Card

Package extractstatic extracts static parts of regexpes.

Useful to prefilter complicated regexp matches on large data sets. See prefilter benchmark for example.

Example

static, _ := extractstatic.String(`really\s?complicated.*regexp`)
fmt.Println(static) // Output: [really complicated regexp]