Implement PCRE Matching (prefer left-branch) #2
@@ -28,17 +28,6 @@ func newMatch(size int) Match {
|
||||
return toRet
|
||||
}
|
||||
|
||||
// Returns the number of valid groups in the match
|
||||
func (m Match) numValidGroups() int {
|
||||
numValid := 0
|
||||
for _, g := range m {
|
||||
if g.StartIdx >= 0 && g.EndIdx >= 0 {
|
||||
numValid++
|
||||
}
|
||||
}
|
||||
return numValid
|
||||
}
|
||||
|
||||
// Returns a string containing the indices of all (valid) groups in the match
|
||||
func (m Match) String() string {
|
||||
var toRet string
|
||||
|
Reference in New Issue
Block a user