Documentation
¶
Overview ¶
Package regexplus provides additional convenience functions over regexp.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
A Map represents the key-value pairs generated by a regexp named group string matching. The keys are the names of named groups and the values are the matched strings.
func FindNamedSubmatches ¶
FindNamedSubmatches uses re to find named submatches of s, and returns a Map from keys (names of groups) to values (matches).
Example:
re := regexp.MustCompile(`(?P<foo>[a-z]+)-(?P<bar>[0-9]+)`)
m := FindNamedSubmatches(re, "abc-123")
m == Map{"foo":"abc", "bar":"123"}
Click to show internal directories.
Click to hide internal directories.