You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/Evolution/RegexTypeOverview.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,11 +134,11 @@ Regexes can be created at run time from a string containing familiar regex synta
134
134
135
135
```swift
136
136
let pattern =#"(\w+)\s\s+(\S+)\s\s+((?:(?!\s\s).)*)\s\s+(.*)"#
137
-
let regex =try!Regex(compiling: pattern)
137
+
let regex =try!Regex(pattern)
138
138
// regex: Regex<AnyRegexOutput>
139
139
140
140
let regex: Regex<(Substring, Substring, Substring, Substring, Substring)> =
141
-
try!Regex(compiling: pattern)
141
+
try!Regex(pattern)
142
142
```
143
143
144
144
*Note*: The syntax accepted and further details on run-time compilation, including `AnyRegexOutput` and extended syntaxes, are discussed in [Run-time Regex Construction][pitches].
0 commit comments