|
|
@ -138,8 +138,8 @@ func pruneIndices(indices []Match) []Match {
|
|
|
|
return toRet
|
|
|
|
return toRet
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// FindString returns a _string_ containing the _text_ of the _leftmost_ match of
|
|
|
|
// FindString returns a string containing the text of the leftmost match of the regex in the given string.
|
|
|
|
// the regex, in the given string. The return value will be an empty string in two situations:
|
|
|
|
// The return value will be an empty string in two situations:
|
|
|
|
// 1. No match was found
|
|
|
|
// 1. No match was found
|
|
|
|
// 2. The match was an empty string
|
|
|
|
// 2. The match was an empty string
|
|
|
|
func (regex Reg) FindString(str string) string {
|
|
|
|
func (regex Reg) FindString(str string) string {
|
|
|
@ -151,11 +151,11 @@ func (regex Reg) FindString(str string) string {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// FindAllString is the 'all' version of FindString.
|
|
|
|
// FindAllString is the 'all' version of FindString.
|
|
|
|
// It returns a _slice of strings_ containing the _text_ of _all_ matches of
|
|
|
|
// It returns a slice of strings containing the text of all matches of
|
|
|
|
// the regex, in the given string.
|
|
|
|
// the regex in the given string.
|
|
|
|
//func FindAllString(regex Reg, str []string) []string {
|
|
|
|
func FindAllString(regex Reg, str []string) []string {
|
|
|
|
//
|
|
|
|
return []string{}
|
|
|
|
//}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// FindNthMatch finds the 'n'th match of the regex represented by the given start-state, with
|
|
|
|
// FindNthMatch finds the 'n'th match of the regex represented by the given start-state, with
|
|
|
|
// the given string.
|
|
|
|
// the given string.
|
|
|
|