Skip to content

Commit e895123

Browse files
amartini51milseman
authored andcommitted
Cross reference TSPL
1 parent 82711ec commit e895123

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Sources/_StringProcessing/Regex/Core.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ public protocol RegexComponent<RegexOutput> {
7676
/// instances using a clear and flexible declarative syntax. Using this
7777
/// style, you can combine, capture, and transform regexes, `RegexBuilder`
7878
/// types, and custom parsers.
79+
///
80+
/// > Note:
81+
/// > Prior to Swift 6,
82+
/// > you might need to write `#/myregex/#` instead of `/myregex/`
83+
/// > when you make a regular expression using a literal.
84+
/// > For more information,
85+
/// > see [Regular Expression Literals][regex-literal] in *[The Swift Programming Language][tspl]*.
86+
///
87+
/// [regex-literal]: https://docs.swift.org/swift-book/documentation/the-swift-programming-language/lexicalstructure/#Regular-Expression-Literals
88+
/// [tspl]: https://docs.swift.org/swift-book/
7989
@available(SwiftStdlib 5.7, *)
8090
public struct Regex<Output>: RegexComponent {
8191
let program: Program

0 commit comments

Comments
 (0)