Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DestructivelySimplify ¶
DestructivelySimplify simplifies the regex ($regex is not modified), it first calls TurnCapturingGroupsIntoNonCapturing, then syntax.Regexp.DestructivelySimplify, and finally it tries its best to simplify the elements of shape AA* into A+.
func RegexForRange ¶
func RegexForRange(min, max int64, conf ...IntegerRangeRegexConfig) string
RegexForRange returns a regex (not between ^$) that matches all numbers in the range [min, max]. The main logic of the implementation is the same as https://github.com/voronind/range-regex (by Dmitry Voronin, BSD 2-Clause license).
Types ¶
type IntegerRangeRegexConfig ¶
Click to show internal directories.
Click to hide internal directories.