I'm building a regular expression to detect if match the following string but its not working. Here is my code:
var str = "asdasdd.ASD98ASD09ASD098ASD098ADS908"
let commsRegex = "\\D[a-z]{7,}.[^a-zA-Z0-9]{28,}"
if (str.rangeOfString(commsRegex,options: .RegularExpressionSearch) != nil) {
str = "itwork.yes"
}
Any of you knows what I'm doing wrong?
I'll really appreciate your help
"^[a-z]{7}\\.[A-Z0-9]{28}$""[a-z]{3}~[a-z]{3}\\.[A-Z0-9]{28}$"if not"[a-z~]{7}\\.[A-Z0-9]{28}$"