VSRegex 1.0.0

VSRegex 1.0.0

VincentSit 维护。



VSRegex 1.0.0

VSRegex

ChinaMobilePhoneNumberRegex - iOS 和 macOS 在 Swift 中的包装器。

使用

let regex = VSRegex() // Match all numbers by default.
let isMatch = regex.matches("+8613800138000")
print(isMatch) // true


let regex = VSRegex(.carrier(.chinaTelecom))
let isMatch = regex.matches("+8613800138000")
print(isMatch) // false

    
let isMatch = VSRegex.matches("+8613800138000")
print(isMatch) // true

    
let isMatch = VSRegex.is("+8613800138000", matches: .carrier(.chinaMobile))
print(isMatch) // true

...

安装

CocoaPods

pod 'VSRegex', '~> 1.0.0'

授权

MIT