NSPredicate SELF MATCHES doesn't work with simple contains regex – Ios swift
All I need is to check using NSPredicate and evaluate pattern if my string contains .page.link phrase. extension String { func isValid(for string: String) -> Bool { NSPredicate(format: "SELF MATCHES %@", string).evaluate(with: self) } } let pattern = ".page.link" //…