/NSPredicate_Matches.swift Secret
Created
July 18, 2024 08:51
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
// email 패턴의 문자열을 찾는다. | |
let pattern = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}" | |
let predicate = NSPredicate(format: "SELF MATCHES %@", pattern) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment