Created
July 12, 2020 04:25
-
-
Save sstadelman/ba7143cdae5969f60045e839ff92deda to your computer and use it in GitHub Desktop.
String + Lookahead capture
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension String { | |
var lookaheadCapture: String { | |
#"\s?\#(self)\s+(?<\#(self)>(\S++))"# | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment