Swift: Match flag groups more strictly as other (? group types exist.

This commit is contained in:
Geoffrey White
2023-07-10 18:50:43 +01:00
parent 952a5d2aa2
commit ef344c6a80

View File

@@ -283,6 +283,7 @@ abstract class RegExp extends Expr {
private predicate flagGroupStart(int start, int end) {
this.isGroupStart(start) and
this.getChar(start + 1) = "?" and
this.getChar(start + 2) in ["i", "x", "s", "m", "w"] and
end = start + 2
}