Latest 2.0.0
Homepage https://github.com/xiayuanquan/XYQRegexPattern
License MIT
Platforms ios , requires ARC
Authors

  正则表达式(因为正则表达式比较常用,所以列出其中常用的式子、当然支持自定义正则表达式)

How to user api

CocoaPods支持

    pod ‘XYQRegexPattern’, ‘~> 2.0.0’
   
image

1、类方法,演示如下:

#import "XYQRegexPatternHelper.h"

NSLog(@"%d",[XYQRegexPatternHelper validateBankCardNumber:@"62218849800236153"]);

NSLog(@"%d",[XYQRegexPatternHelper validateEmail:@"[email protected]"]); 

NSLog(@"%d",[XYQRegexPatternHelper validateCustomRegex:@"^[u4E00-u9FA5]*$" TargetString:@"我只是中文"]);

2、实例方法,演示如下:

#import "XYQRegexPatternHelper.h"

XYQRegexPatternHelper *hepler = [[XYQRegexPatternHelper alloc] init];

NSLog(@"%d",[hepler validateIsValidQQ:@"1383478"]);        

NSLog(@"%d",[hepler validateIsValidMailbox:@"[email protected]"]);

NSLog(@"%d",[hepler validateCustomRegex:@"^[u4E00-u9FA5]*$" TargetString:@"我只是中文"]);

Latest podspec

{
    "name": "XYQRegexPattern",
    "version": "2.0.0",
    "summary": "A Library for iOS to use for Regex Pattern.",
    "homepage": "https://github.com/xiayuanquan/XYQRegexPattern",
    "license": "MIT",
    "authors": {
        "u590fu8fdcu5168": "[email protected]"
    },
    "platforms": {
        "ios": null
    },
    "source": {
        "git": "https://github.com/xiayuanquan/XYQRegexPattern.git",
        "tag": "2.0.0"
    },
    "source_files": "XYQRegexPattern/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This