Is there an example on how to use the following function in module re? I dont understand it because it has an openarray that is not the last argument. When i try to use it i get compilation errors.
proc match*(s: string, pattern: TRegEx, matches: var openarray[string], start = 0): bool
Robert
type
TMatches = array[0 .. 1,string]
var
regex = re"([^=]+)=(.*)"
matches: TMatches
if match("key=value",regex,matches):
echo(matches[0])
echo(matches[1])
Edited by Araq