We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 382bde5 commit 6c88155Copy full SHA for 6c88155
Tests/RegexTests/MatchTests.swift
@@ -1395,6 +1395,14 @@ extension RegexTests {
1395
firstMatchTest(#"(?xx)[ \t]+"#, input: " \t \t", match: "\t")
1396
1397
firstMatchTest("(?xx)[ a && ab ]+", input: " aaba ", match: "aa")
1398
+
1399
+ // Preserve whitespace in quoted section inside extended syntax region
1400
+ firstMatchTest(
1401
+ #"(?x) a b \Q c d \E e f"#, input: "ab c d ef", match: "ab c d ef")
1402
1403
+ #"(?x)[a b]+ _ [a\Q b\E]+"#, input: "aba_ a b a", match: "aba_ a b a")
1404
1405
+ #"(?x)[a b]+ _ [a\Q b\E]+"#, input: "aba _ a b a", match: nil)
1406
}
1407
1408
func testASCIIClasses() {
0 commit comments