parent
a9a9860b0b
commit
ccccd30cf6
2 changed files with 45 additions and 47 deletions
|
|
@ -367,7 +367,7 @@ func contains*(pattern: CaptureBounds, name: string): bool =
|
|||
func contains*(pattern: Captures, name: string): bool =
|
||||
name in CaptureBounds(pattern)
|
||||
|
||||
func checkNamedCaptured(pattern: RegexMatch, name: string): void =
|
||||
func checkNamedCaptured(pattern: RegexMatch, name: string) =
|
||||
if not (name in pattern.captureBounds):
|
||||
raise newException(KeyError, "Group '" & name & "' was not captured")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue