Added support for start-of-input (\A) and end-of-input (\Z) assertions
This commit is contained in:
@@ -878,6 +878,10 @@ func thompson(re []postfixNode) (Reg, error) {
|
||||
stateToAdd.assert = wboundAssert
|
||||
case 'B':
|
||||
stateToAdd.assert = nonwboundAssert
|
||||
case 'A':
|
||||
stateToAdd.assert = soiAssert
|
||||
case 'Z':
|
||||
stateToAdd.assert = eoiAssert
|
||||
}
|
||||
} else { // Lookaround
|
||||
stateToAdd.lookaroundRegex = string(c.contents)
|
||||
|
Reference in New Issue
Block a user