varANY_CHARrune=0xF0002// Represents any character - used for 'dot' metacharacter
varANY_CHARrune=0xF0002// Represents any character - used for states where the allChars flag is on.
funcdotChars()[]rune{// Returns all possible characters represented by the dot metacharacter - this is too tedious to define as a variable, which is why it is a function
start:=0x0020
end:=0x007E
to_return:=make([]rune,(end-start)+1)
fori:=start;i<=end;i++{
to_return[i-start]=rune(i)
}
returnto_return
}
// Returns true if str[idx] and str[idx-1] are separated by a word boundary.
// Returns true if str[idx] and str[idx-1] are separated by a word boundary.