Created
July 12, 2020 04:25
-
-
Save sstadelman/cbec316c0ff0e8c80a256374482f3f4a to your computer and use it in GitHub Desktop.
String + Lookahead capture
This file contains hidden or 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