Created
April 29, 2022 11:27
-
-
Save vladimir-anisimov/286b9553e4eb6107cc7de17e548a38a0 to your computer and use it in GitHub Desktop.
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 { | |
func matches(_ regex: String) -> Bool { | |
return self.range(of: regex, | |
options: .regularExpression, | |
range: nil, | |
locale: nil) != nil | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment