Created
October 14, 2022 19:16
-
-
Save spicyjack/3710a488c2413d7cccb88fc861ec775d to your computer and use it in GitHub Desktop.
Example of NSRegularExpression pattern with multiline + named captures
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
// https://unicode-org.github.io/icu/userguide/strings/regexp.html | |
let TelegramMessagePattern = #""" | |
(?xi) | |
^/(?<command>(start|help|stop)) | |
\s* | |
(?<argument>.*)?$ | |
"""# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment