├── RegularExpressions ├── RegularExpressions.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── WeiXiang.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ ├── xcuserdata │ │ └── WeiXiang.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ └── RegularExpressions.xcscheme │ └── project.pbxproj ├── RegularExpressions │ ├── ViewController.h │ ├── MVC │ │ ├── Controller │ │ │ ├── XWTextHightViewController.h │ │ │ ├── XWViewController.h │ │ │ ├── XWViewController.m │ │ │ └── XWTextHightViewController.m │ │ ├── View │ │ │ ├── XWTableViewCell.h │ │ │ ├── XWTableViewCell.m │ │ │ └── XWTableViewCell.xib │ │ └── Model │ │ │ ├── XWTextPart.m │ │ │ └── XWTextPart.h │ ├── AppDelegate.h │ ├── main.m │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── RegularExpression_PrefixHeader.pch │ ├── Info.plist │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── XWRegularExpression.h │ ├── AppDelegate.m │ ├── ViewController.m │ ├── XWRegularExpression.m │ └── RegexKitLite.h ├── RegularExpressionsTests │ ├── Info.plist │ └── RegularExpressionsTests.m └── RegularExpressionsUITests │ ├── Info.plist │ └── RegularExpressionsUITests.m └── README.md /RegularExpressions/RegularExpressions.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions.xcodeproj/project.xcworkspace/xcuserdata/WeiXiang.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EdwinXiang/RegularExpression/HEAD/RegularExpressions/RegularExpressions.xcodeproj/project.xcworkspace/xcuserdata/WeiXiang.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // RegularExpressions 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/MVC/Controller/XWTextHightViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // XWTextHightViewController.h 3 | // RegularExpressions 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface XWTextHightViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/MVC/View/XWTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // XWTableViewCell.h 3 | // RegularExpressions 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface XWTableViewCell : UITableViewCell 12 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // RegularExpressions 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/MVC/Model/XWTextPart.m: -------------------------------------------------------------------------------- 1 | // 2 | // HWTextPart.m 3 | // 黑马微博2期 4 | // 5 | // Created by apple on 14/11/15. 6 | // Copyright (c) 2014年 heima. All rights reserved. 7 | // 8 | 9 | #import "XWTextPart.h" 10 | 11 | @implementation XWTextPart 12 | - (NSString *)description 13 | { 14 | return [NSString stringWithFormat:@"%@ - %@", self.text, NSStringFromRange(self.range)]; 15 | } 16 | @end 17 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // RegularExpressions 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/MVC/Model/XWTextPart.h: -------------------------------------------------------------------------------- 1 | // 2 | // HWTextPart.h 3 | // 黑马微博2期 4 | // 5 | // Created by apple on 14/11/15. 6 | // Copyright (c) 2014年 heima. All rights reserved. 7 | // 文字的一部分 8 | 9 | #import 10 | 11 | @interface XWTextPart : NSObject 12 | /** 这段文字的内容 */ 13 | @property (nonatomic, copy) NSString *text; 14 | /** 这段文字的范围 */ 15 | @property (nonatomic, assign) NSRange range; 16 | /** 是否为特殊文字 */ 17 | @property (nonatomic, assign, getter = isSpecical) BOOL special; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/MVC/View/XWTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // XWTableViewCell.m 3 | // RegularExpressions 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | // 8 | 9 | #import "XWTableViewCell.h" 10 | 11 | @implementation XWTableViewCell 12 | 13 | - (void)awakeFromNib { 14 | // Initialization code 15 | } 16 | 17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 18 | [super setSelected:selected animated:animated]; 19 | 20 | // Configure the view for the selected state 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions.xcodeproj/xcuserdata/WeiXiang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressionsTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressionsUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/MVC/Controller/XWViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // XWPhoneViewController.h 3 | // RegularExpressions 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | //@"PhoneVc",@"emailVc",@"userPsswordVc",@"IDCardVc",@"allNumberVc",@"urlVc",@"EnglishAlphabetVc" 8 | 9 | #import 10 | 11 | typedef enum { 12 | RegularExpressionTypePhone, 13 | RegularExpressionTypeEmail, 14 | RegularExpressionTypeUrl, 15 | RegularExpressionTypeAllNumber, 16 | RegularExpressionTypeIDCardVc, 17 | RegularExpressionTypeEnglishAlphabetVc, 18 | RegularExpressionTypeuserPsswordVc, 19 | RegularExpressionTypeIPAddress, 20 | RegularExpressionTypeChinese, 21 | }RegularExpressionType; 22 | @interface XWViewController : UIViewController 23 | 24 | @property (nonatomic,assign)RegularExpressionType type; 25 | @end 26 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions.xcodeproj/xcuserdata/WeiXiang.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | RegularExpressions.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | CE9E6A4C1C5EF0CB002F1BE4 16 | 17 | primary 18 | 19 | 20 | CE9E6A651C5EF0CC002F1BE4 21 | 22 | primary 23 | 24 | 25 | CE9E6A701C5EF0CC002F1BE4 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressionsTests/RegularExpressionsTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // RegularExpressionsTests.m 3 | // RegularExpressionsTests 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RegularExpressionsTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation RegularExpressionsTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/RegularExpression_PrefixHeader.pch: -------------------------------------------------------------------------------- 1 | // 2 | // RegularExpression_PrefixHeader.pch 3 | // RegularExpressions 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | // 8 | 9 | #ifndef RegularExpression_PrefixHeader_pch 10 | #define RegularExpression_PrefixHeader_pch 11 | 12 | //屏幕宽度 13 | #define ScreenWidth [UIScreen mainScreen].bounds.size.width 14 | 15 | //屏幕高度 16 | #define ScreenHeight [UIScreen mainScreen].bounds.size.height 17 | 18 | // RGB颜色 19 | #define HWColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0] 20 | #define XWRandomColor HWColor(arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256)) 21 | 22 | #import "XWTableViewCell.h" 23 | #import "XWViewController.h" 24 | #import "XWTextHightViewController.h" 25 | #import "XWRegularExpression.h" 26 | #import "RegexKitLite.h" 27 | #import "XWTextPart.h" 28 | // Include any system framework and library headers here that should be included in all compilation units. 29 | // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file. 30 | 31 | #endif /* RegularExpression_PrefixHeader_pch */ 32 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressionsUITests/RegularExpressionsUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // RegularExpressionsUITests.m 3 | // RegularExpressionsUITests 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RegularExpressionsUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation RegularExpressionsUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/XWRegularExpression.h: -------------------------------------------------------------------------------- 1 | // 2 | // XWRegularExpression.h 3 | // RegularExpressions 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface XWRegularExpression : NSObject 12 | /** 13 | * 是否为电话号码 14 | * 15 | * @param pattern 传入需要检测的字符串 16 | * 17 | * @return 返回检测结果 是或者不是 18 | */ 19 | +(BOOL)isPhoneNumber:(NSString *)patternStr; 20 | /** 21 | * 检测是否为邮箱 22 | * 23 | * @param pattern 传入需要检测的字符串 24 | * 25 | * @return 返回检测结果 是或者不是 26 | */ 27 | +(BOOL)detectionIsEmailQualified:(NSString *)patternStr; 28 | /** 29 | * 检测用户输入密码是否以字母开头,长度在6-18之间,只能包含字符、数字和下划线。 30 | * 31 | * @param pattern 传入需要检测的字符串 32 | * 33 | * @return 返回检测结果 是或者不是 34 | */ 35 | +(BOOL)detectionIsPasswordQualified:(NSString *)patternStr; 36 | /** 37 | * 验证身份证号(15位或18位数字) 38 | * @param pattern 传入需要检测的字符串 39 | * 40 | * @return 返回检测结果 是或者不是 41 | */ 42 | +(BOOL)detectionIsIdCardNumberQualified:(NSString *)patternStr; 43 | 44 | /** 45 | * 验证IP地址(15位或18位数字) 46 | * @param pattern 传入需要检测的字符串 47 | * 48 | * @return 返回检测结果 是或者不是 49 | */ 50 | +(BOOL)detectionIsIPAddress:(NSString *)patternStr; 51 | 52 | /** 53 | * 验证输入的是否全为数字 54 | * @param pattern 传入需要检测的字符串 55 | * 56 | * @return 返回检测结果 是或者不是 57 | */ 58 | +(BOOL)detectionIsAllNumber:(NSString *)patternStr; 59 | 60 | /** 61 | * 验证由26个英文字母组成的字符串 62 | * @param pattern 传入需要检测的字符串 63 | * 64 | * @return 返回检测结果 是或者不是 65 | */ 66 | +(BOOL)detectionIsEnglishAlphabet:(NSString *)patternStr; 67 | /** 68 | * 验证输入的是否是URL地址 69 | * @param pattern 传入需要检测的字符串 70 | * 71 | * @return 返回检测结果 是或者不是 72 | */ 73 | +(BOOL)detectionIsUrl:(NSString *)patternStr; 74 | 75 | /** 76 | * 验证输入的是否是URL地址 77 | * @param pattern 传入需要检测的字符串 78 | * 79 | * @return 返回检测结果 是或者不是 80 | */ 81 | +(BOOL)detectionIsChinese:(NSString *)patternStr; 82 | 83 | /** 84 | * 验证输入的是否是URL地址 85 | * @param pattern 传入需要检测的字符串 86 | * 87 | * @return 返回检测结果 是或者不是 88 | */ 89 | +(BOOL)detectionNormalText:(NSString *)normalStr WithHighLightText:(NSString *)HighLightStr; 90 | @end 91 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // RegularExpressions 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RegularExpression 2 | 使用正则表达式判断输入字符串是否正确;例如一些常用的电话号码判断,密码复杂度判断,URL地址判断,邮箱地址判断,IP地址判断等等; 3 | ##使用方法 4 | 1、下载本工程,工程里面包含demo和相应的库文件 5 | XWRegularExpression.h 6 | XWRegularExpression.m 7 | 2、将上面两个文件导入到你的工程项目中 8 | 在你需要检测的地方调用头文件里面的类方法 9 | ```/** 10 | * 是否为电话号码 11 | * 12 | * @param pattern 传入需要检测的字符串 13 | * 14 | * @return 返回检测结果 是或者不是 15 | */ 16 | +(BOOL)isPhoneNumber:(NSString *)patternStr; 17 | /** 18 | * 检测是否为邮箱 19 | * 20 | * @param pattern 传入需要检测的字符串 21 | * 22 | * @return 返回检测结果 是或者不是 23 | */ 24 | +(BOOL)detectionIsEmailQualified:(NSString *)patternStr; 25 | /** 26 | * 检测用户输入密码是否以字母开头,长度在6-18之间,只能包含字符、数字和下划线。 27 | * 28 | * @param pattern 传入需要检测的字符串 29 | * 30 | * @return 返回检测结果 是或者不是 31 | */ 32 | +(BOOL)detectionIsPasswordQualified:(NSString *)patternStr; 33 | /** 34 | * 验证身份证号(15位或18位数字) 35 | * @param pattern 传入需要检测的字符串 36 | * 37 | * @return 返回检测结果 是或者不是 38 | */ 39 | +(BOOL)detectionIsIdCardNumberQualified:(NSString *)patternStr; 40 | 41 | /** 42 | * 验证IP地址(15位或18位数字) 43 | * @param pattern 传入需要检测的字符串 44 | * 45 | * @return 返回检测结果 是或者不是 46 | */ 47 | +(BOOL)detectionIsIPAddress:(NSString *)patternStr; 48 | 49 | /** 50 | * 验证输入的是否全为数字 51 | * @param pattern 传入需要检测的字符串 52 | * 53 | * @return 返回检测结果 是或者不是 54 | */ 55 | +(BOOL)detectionIsAllNumber:(NSString *)patternStr; 56 | 57 | /** 58 | * 验证由26个英文字母组成的字符串 59 | * @param pattern 传入需要检测的字符串 60 | * 61 | * @return 返回检测结果 是或者不是 62 | */ 63 | +(BOOL)detectionIsEnglishAlphabet:(NSString *)patternStr; 64 | /** 65 | * 验证输入的是否是URL地址 66 | * @param pattern 传入需要检测的字符串 67 | * 68 | * @return 返回检测结果 是或者不是 69 | */ 70 | +(BOOL)detectionIsUrl:(NSString *)patternStr; 71 | 72 | /** 73 | * 验证输入的是否是URL地址 74 | * @param pattern 传入需要检测的字符串 75 | * 76 | * @return 返回检测结果 是或者不是 77 | */ 78 | +(BOOL)detectionIsChinese:(NSString *)patternStr; 79 | 80 | ``` 81 | 在你需要实现的地方调用相应的方法就可以了,eg:检测电话号码是否正确 82 | ``` 83 | if ([XWRegularExpression isPhoneNumber:inputText]) { 84 | self.resultLabel.text = @"输入的是电话号码"; 85 | }else{ 86 | self.resultLabel.text = @"输入的电话号码格式错误"; 87 | } 88 | 89 | ``` 90 | ##效果 91 | ![image](http://b343.photo.store.qq.com/psb?/2932833f-be8b-4313-8b40-99918076f4a8/iPbEfAOxgCT3IzsZgfTJ*Jg8LQx.Q7mXHk9yiLt6JDc!/b/dFcBAAAAAAAA&bo=PAFLAjwBSwICCCw!) 92 | *==如果有什么问题你可以通过邮件联系我:xiangwei_zd@163.com==* 93 | 94 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/MVC/View/XWTableViewCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // RegularExpressions 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 14 | /** 15 | * 数据源 16 | */ 17 | @property (nonatomic,strong) NSMutableArray *dataArr; 18 | @end 19 | 20 | @implementation ViewController 21 | -(NSMutableArray *)dataArr{ 22 | if (!_dataArr) { 23 | _dataArr = [[NSMutableArray alloc]initWithObjects:@"电话号码",@"邮箱",@"网页地址",@"全数字",@"身份证号码",@"全英文字符",@"IP地址",@"用户密码",@"汉字",@"文字高亮显示", nil]; 24 | } 25 | return _dataArr; 26 | } 27 | - (void)viewDidLoad { 28 | [super viewDidLoad]; 29 | 30 | self.tableView.delegate = self; 31 | self.tableView.dataSource = self; 32 | self.tableView.tableFooterView = [[UIView alloc]init]; 33 | //注册 有xib的情况下 34 | [_tableView registerNib:[UINib nibWithNibName:@"XWTableViewCell"bundle:nil] forCellReuseIdentifier:@"xiangwei"]; 35 | 36 | } 37 | 38 | #pragma mark --UITableViewDataSource 39 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 40 | return self.dataArr.count; 41 | } 42 | 43 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 44 | XWTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"xiangwei" forIndexPath:indexPath]; 45 | 46 | cell.titleLabel.text = [NSString stringWithFormat:@"%@",self.dataArr[indexPath.row]]; 47 | return cell; 48 | } 49 | #pragma mark --UITableViewDelegate 50 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 51 | 52 | XWViewController *regularVc = [[XWViewController alloc]init]; 53 | XWTextHightViewController *textVc = [[XWTextHightViewController alloc]init]; 54 | switch (indexPath.row) { 55 | case 0: 56 | regularVc.type = RegularExpressionTypePhone; 57 | [self.navigationController pushViewController:regularVc animated:YES]; 58 | break; 59 | case 1: 60 | regularVc.type = RegularExpressionTypeEmail; 61 | [self.navigationController pushViewController:regularVc animated:YES]; 62 | break; 63 | case 2: 64 | regularVc.type = RegularExpressionTypeUrl; 65 | [self.navigationController pushViewController:regularVc animated:YES]; 66 | break; 67 | case 3: 68 | regularVc.type = RegularExpressionTypeAllNumber; 69 | [self.navigationController pushViewController:regularVc animated:YES]; 70 | break; 71 | case 4: 72 | regularVc.type = RegularExpressionTypeIDCardVc; 73 | [self.navigationController pushViewController:regularVc animated:YES]; 74 | break; 75 | case 5: 76 | regularVc.type = RegularExpressionTypeEnglishAlphabetVc; 77 | [self.navigationController pushViewController:regularVc animated:YES]; 78 | break; 79 | case 6: 80 | regularVc.type = RegularExpressionTypeIPAddress; 81 | [self.navigationController pushViewController:regularVc animated:YES]; 82 | break; 83 | case 7: 84 | regularVc.type = RegularExpressionTypeuserPsswordVc; 85 | [self.navigationController pushViewController:regularVc animated:YES]; 86 | break; 87 | case 8: 88 | regularVc.type = RegularExpressionTypeChinese; 89 | [self.navigationController pushViewController:regularVc animated:YES]; 90 | break; 91 | 92 | default: 93 | [self.navigationController pushViewController:textVc animated:YES]; 94 | break; 95 | 96 | } 97 | 98 | 99 | } 100 | - (void)didReceiveMemoryWarning { 101 | [super didReceiveMemoryWarning]; 102 | // Dispose of any resources that can be recreated. 103 | } 104 | 105 | @end 106 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/XWRegularExpression.m: -------------------------------------------------------------------------------- 1 | // 2 | // XWRegularExpression.m 3 | // RegularExpressions 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | // 8 | 9 | #import "XWRegularExpression.h" 10 | 11 | @implementation XWRegularExpression 12 | 13 | +(BOOL)isPhoneNumber:(NSString *)patternStr{ 14 | 15 | NSString *pattern = @"^1[34578]\\d{9}$"; 16 | NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:pattern options:0 error:nil]; 17 | NSArray *results = [regex matchesInString:patternStr options:0 range:NSMakeRange(0, patternStr.length)]; 18 | return results.count > 0; 19 | } 20 | 21 | +(BOOL)detectionIsEmailQualified:(NSString *)patternStr{ 22 | 23 | NSString *pattern = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"; 24 | NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:pattern options:0 error:nil]; 25 | NSArray *results = [regex matchesInString:patternStr options:0 range:NSMakeRange(0, patternStr.length)]; 26 | return results.count > 0; 27 | } 28 | 29 | +(BOOL)detectionIsIdCardNumberQualified:(NSString *)patternStr{ 30 | NSString *pattern = @"^\\d{15}|\\d{18}$"; 31 | NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:pattern options:0 error:nil]; 32 | NSArray *results = [regex matchesInString:patternStr options:0 range:NSMakeRange(0, patternStr.length)]; 33 | return results.count > 0; 34 | } 35 | 36 | +(BOOL)detectionIsPasswordQualified:(NSString *)patternStr{ 37 | NSString *pattern = @"^[a-zA-Z]\\w.{5,17}$"; 38 | NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:pattern options:0 error:nil]; 39 | NSArray *results = [regex matchesInString:patternStr options:0 range:NSMakeRange(0, patternStr.length)]; 40 | return results.count > 0; 41 | } 42 | 43 | + (BOOL)detectionIsIPAddress:(NSString *)patternStr 44 | { 45 | 46 | NSString *pattern = @"((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)"; 47 | NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:pattern options:0 error:nil]; 48 | NSArray *results = [regex matchesInString:patternStr options:0 range:NSMakeRange(0, patternStr.length)]; 49 | return results.count > 0; 50 | } 51 | 52 | +(BOOL)detectionIsAllNumber:(NSString *)patternStr{ 53 | NSString *pattern = @"^[0-9]*$"; 54 | NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:pattern options:0 error:nil]; 55 | NSArray *results = [regex matchesInString:patternStr options:0 range:NSMakeRange(0, patternStr.length)]; 56 | return results.count > 0; 57 | } 58 | 59 | +(BOOL)detectionIsEnglishAlphabet:(NSString *)patternStr{ 60 | NSString *pattern = @"^[A-Za-z]+$"; 61 | NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:pattern options:0 error:nil]; 62 | NSArray *results = [regex matchesInString:patternStr options:0 range:NSMakeRange(0, patternStr.length)]; 63 | return results.count > 0; 64 | } 65 | 66 | +(BOOL)detectionIsUrl:(NSString *)patternStr{ 67 | NSString *pattern = @"\\b(([\\w-]+://?|www[.])[^\\s()<>]+(?:\\([\\w\\d]+\\)|([^[:punct:]\\s]|/)))"; 68 | NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:pattern options:0 error:nil]; 69 | NSArray *results = [regex matchesInString:patternStr options:0 range:NSMakeRange(0, patternStr.length)]; 70 | return results.count > 0; 71 | } 72 | +(BOOL)detectionIsChinese:(NSString *)patternStr{ 73 | NSString *pattern = @"[\u4e00-\u9fa5]+"; 74 | NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:pattern options:0 error:nil]; 75 | NSArray *results = [regex matchesInString:patternStr options:0 range:NSMakeRange(0, patternStr.length)]; 76 | return results.count > 0; 77 | } 78 | 79 | +(BOOL)detectionNormalText:(NSString *)normalStr WithHighLightText:(NSString *)HighLightStr{ 80 | 81 | NSString *pattern = [NSString stringWithFormat:@"%@",HighLightStr]; 82 | NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:pattern options:0 error:nil]; 83 | NSArray *results = [regex matchesInString:normalStr options:0 range:NSMakeRange(0, normalStr.length)]; 84 | for (NSTextCheckingResult *resltText in results) { 85 | NSLog(@"----------------%zd",resltText.range.length); 86 | } 87 | return results.count > 0; 88 | } 89 | @end 90 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions.xcodeproj/xcuserdata/WeiXiang.xcuserdatad/xcschemes/RegularExpressions.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/MVC/Controller/XWViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // XWPhoneViewController.m 3 | // RegularExpressions 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | // 8 | 9 | #import "XWViewController.h" 10 | // 随机色 11 | 12 | @interface XWViewController () 13 | /** 14 | * 判断类型 15 | */ 16 | @property (strong, nonatomic) UILabel *titleLabel; 17 | /** 18 | * 判断结果 19 | */ 20 | @property (strong, nonatomic) UILabel *resultLabel; 21 | /** 22 | * 输入要判断的字符串 23 | */ 24 | @property (strong, nonatomic) UITextField *textField; 25 | @end 26 | 27 | @implementation XWViewController 28 | 29 | - (void)viewDidLoad { 30 | [super viewDidLoad]; 31 | 32 | self.view.backgroundColor = XWRandomColor; 33 | [self gnerateUI]; 34 | switch (self.type) { 35 | case RegularExpressionTypePhone: 36 | self.navigationItem.title = @"电话号码"; 37 | self.titleLabel.text = @"电话号码"; 38 | break; 39 | case RegularExpressionTypeEmail: 40 | self.navigationItem.title = @"邮箱地址"; 41 | self.titleLabel.text = @"邮箱地址"; 42 | break; 43 | case RegularExpressionTypeuserPsswordVc: 44 | self.navigationItem.title = @"用户密码"; 45 | self.titleLabel.text = @"用户密码"; 46 | break; 47 | case RegularExpressionTypeIDCardVc: 48 | self.navigationItem.title = @"身份证号码"; 49 | self.titleLabel.text = @"身份证号码"; 50 | break; 51 | case RegularExpressionTypeAllNumber: 52 | self.navigationItem.title = @"全数字"; 53 | self.titleLabel.text = @"全数字"; 54 | break; 55 | case RegularExpressionTypeUrl: 56 | self.navigationItem.title = @"网页地址URL"; 57 | self.titleLabel.text = @"网页地址URL"; 58 | break; 59 | case RegularExpressionTypeIPAddress: 60 | self.navigationItem.title = @"IP地址"; 61 | self.titleLabel.text = @"IP地址"; 62 | break; 63 | case RegularExpressionTypeChinese: 64 | self.navigationItem.title = @"汉字"; 65 | self.titleLabel.text = @"汉字"; 66 | break; 67 | default: 68 | self.navigationItem.title = @"英文字符"; 69 | self.titleLabel.text = @"英文字符"; 70 | break; 71 | } 72 | 73 | } 74 | 75 | -(void)gnerateUI{ 76 | 77 | self.resultLabel = [[UILabel alloc]initWithFrame:CGRectMake(0,0 , 100, 40)]; 78 | self.resultLabel.center = self.view.center; 79 | self.resultLabel.backgroundColor = [UIColor whiteColor]; 80 | self.resultLabel.numberOfLines = 0; 81 | self.resultLabel.layer.cornerRadius = 5; 82 | self.resultLabel.layer.masksToBounds = YES; 83 | self.resultLabel.adjustsFontSizeToFitWidth = YES; 84 | self.resultLabel.textAlignment = NSTextAlignmentLeft; 85 | self.resultLabel.font = [UIFont systemFontOfSize:14.0]; 86 | [self.view addSubview:self.resultLabel]; 87 | 88 | self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 80, 32)]; 89 | CGPoint labelCenter; 90 | labelCenter.x = 100; 91 | labelCenter.y = self.view.center.y-50; 92 | self.titleLabel.center = labelCenter; 93 | self.titleLabel.layer.cornerRadius = 5; 94 | self.titleLabel.layer.masksToBounds = YES; 95 | self.titleLabel.adjustsFontSizeToFitWidth = YES; 96 | self.titleLabel.backgroundColor = [UIColor whiteColor]; 97 | self.titleLabel.numberOfLines = 0; 98 | self.titleLabel.textAlignment = NSTextAlignmentCenter; 99 | self.titleLabel.font = [UIFont systemFontOfSize:14.0]; 100 | [self.view addSubview:self.titleLabel]; 101 | 102 | self.textField = [[UITextField alloc]initWithFrame:CGRectMake(CGRectGetMaxX(self.titleLabel.frame)+10, CGRectGetMinY(self.titleLabel.frame),150, 32)]; 103 | self.textField.borderStyle = UITextBorderStyleRoundedRect; 104 | self.textField.backgroundColor = [UIColor whiteColor]; 105 | self.textField.textAlignment = NSTextAlignmentLeft; 106 | self.textField.placeholder = @"请输入字符串"; 107 | self.textField.font = [UIFont systemFontOfSize:14]; 108 | self.textField.keyboardType = UIKeyboardTypeNumbersAndPunctuation; 109 | self.textField.returnKeyType = UIReturnKeyNext; 110 | self.textField.clearsOnBeginEditing = YES; 111 | self.textField.adjustsFontSizeToFitWidth = YES; 112 | self.textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;//设置对齐方式 113 | self.textField.delegate = self; 114 | [self.view addSubview:self.textField]; 115 | 116 | } 117 | 118 | -(void)judgeTextFieldResultType:(NSString *)inputText{ 119 | switch (self.type) { 120 | case RegularExpressionTypePhone: 121 | if ([XWRegularExpression isPhoneNumber:inputText]) { 122 | self.resultLabel.text = @"输入的是电话号码"; 123 | }else{ 124 | self.resultLabel.text = @"输入的电话号码格式错误"; 125 | } 126 | break; 127 | case RegularExpressionTypeEmail: 128 | if ([XWRegularExpression detectionIsEmailQualified:inputText]) { 129 | self.resultLabel.text = @"输入的是正确的邮箱地址"; 130 | }else{ 131 | self.resultLabel.text = @"输入的邮箱地址格式错误"; 132 | } 133 | 134 | break; 135 | case RegularExpressionTypeuserPsswordVc: 136 | if ([XWRegularExpression detectionIsPasswordQualified:inputText]) { 137 | self.resultLabel.text = @"输入密码格式正确,是以字母开头,包含数字,特殊字符以字母结尾"; 138 | }else{ 139 | self.resultLabel.text = @"输入的密码格式错误"; 140 | } 141 | 142 | break; 143 | case RegularExpressionTypeIDCardVc: 144 | if ([XWRegularExpression detectionIsIdCardNumberQualified:inputText]) { 145 | self.resultLabel.text = @"输入的身份证号码格式正确"; 146 | }else{ 147 | self.resultLabel.text = @"输入的身份证号码格式错误"; 148 | } 149 | break; 150 | case RegularExpressionTypeAllNumber: 151 | if ([XWRegularExpression detectionIsAllNumber:inputText]) { 152 | self.resultLabel.text = @"输入的是全为数字"; 153 | }else{ 154 | self.resultLabel.text = @"输入的数字格式错误"; 155 | } 156 | 157 | break; 158 | case RegularExpressionTypeUrl: 159 | if ([XWRegularExpression detectionIsUrl:inputText]) { 160 | self.resultLabel.text = @"输入的URL地址正确"; 161 | }else{ 162 | self.resultLabel.text = @"输入的url地址格式错误"; 163 | } 164 | 165 | break; 166 | case RegularExpressionTypeIPAddress: 167 | if ([XWRegularExpression detectionIsIPAddress:inputText]) { 168 | self.resultLabel.text = @"输入的IP地址正确"; 169 | }else{ 170 | self.resultLabel.text = @"输入的IP地址格式错误"; 171 | } 172 | break; 173 | case RegularExpressionTypeChinese: 174 | if ([XWRegularExpression detectionIsChinese:inputText]) { 175 | self.resultLabel.text = @"输入的是汉字"; 176 | }else{ 177 | self.resultLabel.text = @"输入的不是汉字"; 178 | } 179 | break; 180 | default: 181 | case RegularExpressionTypeEnglishAlphabetVc: 182 | if ([XWRegularExpression detectionIsEnglishAlphabet:inputText]) { 183 | self.resultLabel.text = @"输入的是全为26个字母组成的字符串"; 184 | }else{ 185 | self.resultLabel.text = @"输入的字母字符串格式错误"; 186 | } 187 | 188 | break; 189 | } 190 | } 191 | #pragma mark --UITextFieldDelegate 192 | -(BOOL)textFieldShouldReturn:(UITextField *)textField{ 193 | //收起键盘 194 | [self.textField resignFirstResponder]; 195 | NSString *inputText = textField.text; 196 | [self judgeTextFieldResultType:inputText]; 197 | 198 | return YES; 199 | } 200 | - (void)didReceiveMemoryWarning { 201 | [super didReceiveMemoryWarning]; 202 | // Dispose of any resources that can be recreated. 203 | } 204 | 205 | /* 206 | #pragma mark - Navigation 207 | 208 | // In a storyboard-based application, you will often want to do a little preparation before navigation 209 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 210 | // Get the new view controller using [segue destinationViewController]. 211 | // Pass the selected object to the new view controller. 212 | } 213 | */ 214 | 215 | @end 216 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/MVC/Controller/XWTextHightViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // XWTextHightViewController.m 3 | // RegularExpressions 4 | // 5 | // Created by Edwin on 16/2/1. 6 | // Copyright © 2016年 EdwinXiang. All rights reserved. 7 | // 8 | 9 | #import "XWTextHightViewController.h" 10 | 11 | @interface XWTextHightViewController () 12 | /** 13 | * 输入正常的字符串 14 | */ 15 | @property (nonatomic,strong) UITextView *normalTextView; 16 | /** 17 | * 输入需要高亮显示的文字 18 | */ 19 | @property (nonatomic,strong) UITextField *hightlightTextField; 20 | /** 21 | * 显示高亮显示的结果 22 | */ 23 | @property (nonatomic,strong) UILabel *resultLabel; 24 | 25 | @property (nonatomic,copy) NSString *normalStr; 26 | 27 | @property (nonatomic,strong) NSAttributedString *attributeStr; 28 | 29 | @end 30 | 31 | @implementation XWTextHightViewController 32 | 33 | -(void)viewWillAppear:(BOOL)animated{ 34 | [super viewWillAppear:animated]; 35 | [self.normalTextView becomeFirstResponder]; 36 | } 37 | - (void)viewDidLoad { 38 | [super viewDidLoad]; 39 | self.view.backgroundColor = [UIColor orangeColor]; 40 | self.title = @"文字高亮显示"; 41 | UILabel *labelS = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, 20)]; 42 | labelS.backgroundColor = [UIColor clearColor]; 43 | [self.view addSubview:labelS]; 44 | //输入框 45 | _normalTextView = [[UITextView alloc]initWithFrame:CGRectMake(20,79,ScreenWidth-40,200)]; 46 | _normalTextView.layer.cornerRadius = 5; 47 | _normalTextView.delegate = self; 48 | _normalTextView.font = [UIFont systemFontOfSize:14.0f]; 49 | _normalTextView.textColor = [UIColor blackColor]; 50 | _normalTextView.returnKeyType = UIReturnKeyDone; 51 | _normalTextView.keyboardType = UIKeyboardTypeDefault; 52 | _normalTextView.autocorrectionType = UITextAutocorrectionTypeYes; //开启自动纠错 53 | _normalTextView.editable = YES; 54 | _normalTextView.scrollEnabled = YES; 55 | _normalTextView.showsHorizontalScrollIndicator = NO; 56 | _normalTextView.showsVerticalScrollIndicator = NO; 57 | _normalTextView.delegate = self; 58 | 59 | [self.view addSubview:_normalTextView]; 60 | 61 | _hightlightTextField = [[UITextField alloc]initWithFrame:CGRectMake(CGRectGetMinX(self.normalTextView.frame)+10, CGRectGetMaxY(self.normalTextView.frame)+10,CGRectGetWidth(self.normalTextView.frame)-20, 32)]; 62 | _hightlightTextField.borderStyle = UITextBorderStyleRoundedRect; 63 | _hightlightTextField.backgroundColor = [UIColor whiteColor]; 64 | _hightlightTextField.textAlignment = NSTextAlignmentLeft; 65 | _hightlightTextField.placeholder = @"请输入高亮显示的字符串"; 66 | _hightlightTextField.font = [UIFont systemFontOfSize:14]; 67 | _hightlightTextField.textColor = [UIColor blackColor]; 68 | _hightlightTextField.keyboardType = UIKeyboardTypeNumbersAndPunctuation; 69 | _hightlightTextField.returnKeyType = UIReturnKeyNext; 70 | _hightlightTextField.clearsOnBeginEditing = YES; 71 | _hightlightTextField.adjustsFontSizeToFitWidth = YES; 72 | _hightlightTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;//设置对齐方式 73 | _hightlightTextField.delegate = self; 74 | [self.view addSubview:_hightlightTextField]; 75 | 76 | UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMinX(_normalTextView.frame), CGRectGetMaxY(_hightlightTextField.frame)+10,50, 30)]; 77 | label.text = @"结果:"; 78 | label.textAlignment = NSTextAlignmentCenter; 79 | label.font = [UIFont systemFontOfSize:14.0f]; 80 | [self.view addSubview:label]; 81 | 82 | self.resultLabel = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMinX(label.frame), CGRectGetMaxY(label.frame)+5, CGRectGetWidth(_normalTextView.frame), 100)]; 83 | self.resultLabel.layer.borderWidth = 1; 84 | self.resultLabel.layer.borderColor = [UIColor blackColor].CGColor; 85 | self.resultLabel.layer.cornerRadius = 5; 86 | self.resultLabel.layer.masksToBounds = YES; 87 | self.resultLabel.adjustsFontSizeToFitWidth = YES; 88 | self.resultLabel.backgroundColor = [UIColor whiteColor]; 89 | self.resultLabel.numberOfLines = 0; 90 | self.resultLabel.textAlignment = NSTextAlignmentLeft; 91 | self.resultLabel.font = [UIFont systemFontOfSize:14.0]; 92 | [self.view addSubview:self.resultLabel]; 93 | 94 | 95 | } 96 | #pragma mark --UITextFieldDelegate 97 | -(BOOL)textFieldShouldReturn:(UITextField *)textField{ 98 | //收起键盘 99 | [self.hightlightTextField resignFirstResponder]; 100 | NSString *inputText = textField.text; 101 | NSLog(@"%@---%@",self.normalStr,inputText); 102 | self.attributeStr = [self attributedTextWithText:self.normalStr withPattern:inputText]; 103 | self.resultLabel.attributedText = self.attributeStr; 104 | 105 | return YES; 106 | } 107 | 108 | #pragma mark --textViewDeleagate 109 | -(BOOL)textViewShouldEndEditing:(UITextView *)textView{ 110 | 111 | self.normalStr = textView.text; 112 | NSLog(@"----------------%@",self.normalStr); 113 | return YES; 114 | } 115 | 116 | -(NSAttributedString *)attributedTextWithText:(NSString *)text withPattern:(NSString *)pattern{ 117 | NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] init]; 118 | // // 表情的规则 119 | // NSString *emotionPattern = @"\\[[0-9a-zA-Z\\u4e00-\\u9fa5]+\\]"; 120 | // // @的规则 121 | // NSString *atPattern = @"@[0-9a-zA-Z\\u4e00-\\u9fa5-_]+"; 122 | // // #话题#的规则 123 | // NSString *topicPattern = @"#[0-9a-zA-Z\\u4e00-\\u9fa5]+#"; 124 | // // url链接的规则 125 | // NSString *urlPattern = @"\\b(([\\w-]+://?|www[.])[^\\s()<>]+(?:\\([\\w\\d]+\\)|([^[:punct:]\\s]|/)))"; 126 | // NSString *pattern = [NSString stringWithFormat:@"%@|%@|%@|%@", emotionPattern, atPattern, topicPattern, urlPattern]; 127 | 128 | // 遍历所有的特殊字符串 129 | NSMutableArray *parts = [NSMutableArray array]; 130 | [text enumerateStringsMatchedByRegex:pattern usingBlock:^(NSInteger captureCount, NSString *const __unsafe_unretained *capturedStrings, const NSRange *capturedRanges, volatile BOOL *const stop) { 131 | if ((*capturedRanges).length == 0) return; 132 | 133 | XWTextPart *part = [[XWTextPart alloc] init]; 134 | part.text = *capturedStrings; 135 | part.special = YES; 136 | part.range = *capturedRanges; 137 | [parts addObject:part]; 138 | }]; 139 | // 遍历所有的非特殊字符 140 | [text enumerateStringsSeparatedByRegex:pattern usingBlock:^(NSInteger captureCount, NSString *const __unsafe_unretained *capturedStrings, const NSRange *capturedRanges, volatile BOOL *const stop) { 141 | if ((*capturedRanges).length == 0) return; 142 | 143 | XWTextPart *part = [[XWTextPart alloc] init]; 144 | part.text = *capturedStrings; 145 | part.range = *capturedRanges; 146 | [parts addObject:part]; 147 | }]; 148 | 149 | // 排序 150 | // 按照从小 -> 大的顺序排列对象 151 | [parts sortUsingComparator:^NSComparisonResult(XWTextPart *part1, XWTextPart *part2) { 152 | // NSOrderedAscending = -1L, NSOrderedSame, NSOrderedDescending 153 | // 返回NSOrderedSame:两个一样大 154 | // NSOrderedAscending(升序):part2>part1 155 | // NSOrderedDescending(降序):part1>part2 156 | if (part1.range.location > part2.range.location) { 157 | // part1>part2 158 | // part1放后面, part2放前面 159 | return NSOrderedDescending; 160 | } 161 | // part1 *)touches withEvent:(UIEvent *)event{ 189 | [self.normalTextView resignFirstResponder]; 190 | } 191 | - (void)didReceiveMemoryWarning { 192 | [super didReceiveMemoryWarning]; 193 | // Dispose of any resources that can be recreated. 194 | } 195 | 196 | /* 197 | #pragma mark - Navigation 198 | 199 | // In a storyboard-based application, you will often want to do a little preparation before navigation 200 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 201 | // Get the new view controller using [segue destinationViewController]. 202 | // Pass the selected object to the new view controller. 203 | } 204 | */ 205 | 206 | @end 207 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 85 | 107 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions/RegexKitLite.h: -------------------------------------------------------------------------------- 1 | // 2 | // RegexKitLite.h 3 | // http://regexkit.sourceforge.net/ 4 | // Licensed under the terms of the BSD License, as specified below. 5 | // 6 | 7 | /* 8 | Copyright (c) 2008-2010, John Engelhart 9 | 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without 13 | modification, are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | * Neither the name of the Zang Industries nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 32 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 33 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 34 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 35 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 36 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | */ 38 | 39 | #ifdef __OBJC__ 40 | #import 41 | #import 42 | #import 43 | #import 44 | #import 45 | #endif // __OBJC__ 46 | 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | 53 | #ifdef __cplusplus 54 | extern "C" { 55 | #endif 56 | 57 | #ifndef REGEXKITLITE_VERSION_DEFINED 58 | #define REGEXKITLITE_VERSION_DEFINED 59 | 60 | #define _RKL__STRINGIFY(b) #b 61 | #define _RKL_STRINGIFY(a) _RKL__STRINGIFY(a) 62 | #define _RKL_JOIN_VERSION(a,b) _RKL_STRINGIFY(a##.##b) 63 | #define _RKL_VERSION_STRING(a,b) _RKL_JOIN_VERSION(a,b) 64 | 65 | #define REGEXKITLITE_VERSION_MAJOR 4 66 | #define REGEXKITLITE_VERSION_MINOR 0 67 | 68 | #define REGEXKITLITE_VERSION_CSTRING _RKL_VERSION_STRING(REGEXKITLITE_VERSION_MAJOR, REGEXKITLITE_VERSION_MINOR) 69 | #define REGEXKITLITE_VERSION_NSSTRING @REGEXKITLITE_VERSION_CSTRING 70 | 71 | #endif // REGEXKITLITE_VERSION_DEFINED 72 | 73 | #if !defined(RKL_BLOCKS) && defined(NS_BLOCKS_AVAILABLE) && (NS_BLOCKS_AVAILABLE == 1) 74 | #define RKL_BLOCKS 1 75 | #endif 76 | 77 | #if defined(RKL_BLOCKS) && (RKL_BLOCKS == 1) 78 | #define _RKL_BLOCKS_ENABLED 1 79 | #endif // defined(RKL_BLOCKS) && (RKL_BLOCKS == 1) 80 | 81 | #if defined(_RKL_BLOCKS_ENABLED) && !defined(__BLOCKS__) 82 | #warning RegexKitLite support for Blocks is enabled, but __BLOCKS__ is not defined. This compiler may not support Blocks, in which case the behavior is undefined. This will probably cause numerous compiler errors. 83 | #endif // defined(_RKL_BLOCKS_ENABLED) && !defined(__BLOCKS__) 84 | 85 | // For Mac OS X < 10.5. 86 | #ifndef NSINTEGER_DEFINED 87 | #define NSINTEGER_DEFINED 88 | #if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) 89 | typedef long NSInteger; 90 | typedef unsigned long NSUInteger; 91 | #define NSIntegerMin LONG_MIN 92 | #define NSIntegerMax LONG_MAX 93 | #define NSUIntegerMax ULONG_MAX 94 | #else // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) 95 | typedef int NSInteger; 96 | typedef unsigned int NSUInteger; 97 | #define NSIntegerMin INT_MIN 98 | #define NSIntegerMax INT_MAX 99 | #define NSUIntegerMax UINT_MAX 100 | #endif // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) 101 | #endif // NSINTEGER_DEFINED 102 | 103 | #ifndef RKLREGEXOPTIONS_DEFINED 104 | #define RKLREGEXOPTIONS_DEFINED 105 | 106 | // These must be identical to their ICU regex counterparts. See http://www.icu-project.org/userguide/regexp.html 107 | enum { 108 | RKLNoOptions = 0, 109 | RKLCaseless = 2, 110 | RKLComments = 4, 111 | RKLDotAll = 32, 112 | RKLMultiline = 8, 113 | RKLUnicodeWordBoundaries = 256 114 | }; 115 | typedef uint32_t RKLRegexOptions; // This must be identical to the ICU 'flags' argument type. 116 | 117 | #endif // RKLREGEXOPTIONS_DEFINED 118 | 119 | #ifndef RKLREGEXENUMERATIONOPTIONS_DEFINED 120 | #define RKLREGEXENUMERATIONOPTIONS_DEFINED 121 | 122 | enum { 123 | RKLRegexEnumerationNoOptions = 0UL, 124 | RKLRegexEnumerationCapturedStringsNotRequired = 1UL << 9, 125 | RKLRegexEnumerationReleaseStringReturnedByReplacementBlock = 1UL << 10, 126 | RKLRegexEnumerationFastCapturedStringsXXX = 1UL << 11, 127 | }; 128 | typedef NSUInteger RKLRegexEnumerationOptions; 129 | 130 | #endif // RKLREGEXENUMERATIONOPTIONS_DEFINED 131 | 132 | #ifndef _REGEXKITLITE_H_ 133 | #define _REGEXKITLITE_H_ 134 | 135 | #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__APPLE_CC__) && (__APPLE_CC__ >= 5465) 136 | #define RKL_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) 137 | #else 138 | #define RKL_DEPRECATED_ATTRIBUTE 139 | #endif 140 | 141 | #if defined(NS_REQUIRES_NIL_TERMINATION) 142 | #define RKL_REQUIRES_NIL_TERMINATION NS_REQUIRES_NIL_TERMINATION 143 | #else // defined(NS_REQUIRES_NIL_TERMINATION) 144 | #define RKL_REQUIRES_NIL_TERMINATION 145 | #endif // defined(NS_REQUIRES_NIL_TERMINATION) 146 | 147 | // This requires a few levels of rewriting to get the desired results. 148 | #define _RKL_CONCAT_2(c,d) c ## d 149 | #define _RKL_CONCAT(a,b) _RKL_CONCAT_2(a,b) 150 | 151 | #ifdef RKL_PREPEND_TO_METHODS 152 | #define RKL_METHOD_PREPEND(x) _RKL_CONCAT(RKL_PREPEND_TO_METHODS, x) 153 | #else // RKL_PREPEND_TO_METHODS 154 | #define RKL_METHOD_PREPEND(x) x 155 | #endif // RKL_PREPEND_TO_METHODS 156 | 157 | // If it looks like low memory notifications might be available, add code to register and respond to them. 158 | // This is (should be) harmless if it turns out that this isn't the case, since the notification that we register for, 159 | // UIApplicationDidReceiveMemoryWarningNotification, is dynamically looked up via dlsym(). 160 | #if ((defined(TARGET_OS_EMBEDDED) && (TARGET_OS_EMBEDDED != 0)) || (defined(TARGET_OS_IPHONE) && (TARGET_OS_IPHONE != 0))) && (!defined(RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS) || (RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS != 0)) 161 | #define RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS 1 162 | #endif 163 | 164 | #ifdef __OBJC__ 165 | 166 | // NSException exception name. 167 | extern NSString * const RKLICURegexException; 168 | 169 | // NSError error domains and user info keys. 170 | extern NSString * const RKLICURegexErrorDomain; 171 | 172 | extern NSString * const RKLICURegexEnumerationOptionsErrorKey; 173 | extern NSString * const RKLICURegexErrorCodeErrorKey; 174 | extern NSString * const RKLICURegexErrorNameErrorKey; 175 | extern NSString * const RKLICURegexLineErrorKey; 176 | extern NSString * const RKLICURegexOffsetErrorKey; 177 | extern NSString * const RKLICURegexPreContextErrorKey; 178 | extern NSString * const RKLICURegexPostContextErrorKey; 179 | extern NSString * const RKLICURegexRegexErrorKey; 180 | extern NSString * const RKLICURegexRegexOptionsErrorKey; 181 | extern NSString * const RKLICURegexReplacedCountErrorKey; 182 | extern NSString * const RKLICURegexReplacedStringErrorKey; 183 | extern NSString * const RKLICURegexReplacementStringErrorKey; 184 | extern NSString * const RKLICURegexSubjectRangeErrorKey; 185 | extern NSString * const RKLICURegexSubjectStringErrorKey; 186 | 187 | @interface NSString (RegexKitLiteAdditions) 188 | 189 | + (void)RKL_METHOD_PREPEND(clearStringCache); 190 | 191 | // Although these are marked as deprecated, a bug in GCC prevents a warning from being issues for + class methods. Filed bug with Apple, #6736857. 192 | + (NSInteger)RKL_METHOD_PREPEND(captureCountForRegex):(NSString *)regex RKL_DEPRECATED_ATTRIBUTE; 193 | + (NSInteger)RKL_METHOD_PREPEND(captureCountForRegex):(NSString *)regex options:(RKLRegexOptions)options error:(NSError **)error RKL_DEPRECATED_ATTRIBUTE; 194 | 195 | - (NSArray *)RKL_METHOD_PREPEND(componentsSeparatedByRegex):(NSString *)regex; 196 | - (NSArray *)RKL_METHOD_PREPEND(componentsSeparatedByRegex):(NSString *)regex range:(NSRange)range; 197 | - (NSArray *)RKL_METHOD_PREPEND(componentsSeparatedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error; 198 | 199 | - (BOOL)RKL_METHOD_PREPEND(isMatchedByRegex):(NSString *)regex; 200 | - (BOOL)RKL_METHOD_PREPEND(isMatchedByRegex):(NSString *)regex inRange:(NSRange)range; 201 | - (BOOL)RKL_METHOD_PREPEND(isMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error; 202 | 203 | - (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex; 204 | - (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex capture:(NSInteger)capture; 205 | - (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex inRange:(NSRange)range; 206 | - (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range capture:(NSInteger)capture error:(NSError **)error; 207 | 208 | - (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex; 209 | - (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex capture:(NSInteger)capture; 210 | - (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex inRange:(NSRange)range; 211 | - (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range capture:(NSInteger)capture error:(NSError **)error; 212 | 213 | - (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement; 214 | - (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement range:(NSRange)searchRange; 215 | - (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement options:(RKLRegexOptions)options range:(NSRange)searchRange error:(NSError **)error; 216 | 217 | //// >= 3.0 218 | 219 | - (NSInteger)RKL_METHOD_PREPEND(captureCount); 220 | - (NSInteger)RKL_METHOD_PREPEND(captureCountWithOptions):(RKLRegexOptions)options error:(NSError **)error; 221 | 222 | - (BOOL)RKL_METHOD_PREPEND(isRegexValid); 223 | - (BOOL)RKL_METHOD_PREPEND(isRegexValidWithOptions):(RKLRegexOptions)options error:(NSError **)error; 224 | 225 | - (void)RKL_METHOD_PREPEND(flushCachedRegexData); 226 | 227 | - (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex; 228 | - (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex capture:(NSInteger)capture; 229 | - (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex range:(NSRange)range; 230 | - (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range capture:(NSInteger)capture error:(NSError **)error; 231 | 232 | 233 | - (NSArray *)RKL_METHOD_PREPEND(captureComponentsMatchedByRegex):(NSString *)regex; 234 | - (NSArray *)RKL_METHOD_PREPEND(captureComponentsMatchedByRegex):(NSString *)regex range:(NSRange)range; 235 | - (NSArray *)RKL_METHOD_PREPEND(captureComponentsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error; 236 | 237 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfCaptureComponentsMatchedByRegex):(NSString *)regex; 238 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfCaptureComponentsMatchedByRegex):(NSString *)regex range:(NSRange)range; 239 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfCaptureComponentsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error; 240 | 241 | //// >= 4.0 242 | 243 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 244 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex range:(NSRange)range withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 245 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 246 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withFirstKey:(id)firstKey arguments:(va_list)varArgsList; 247 | 248 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeys:(id *)keys forCaptures:(int *)captures count:(NSUInteger)count; 249 | 250 | - (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 251 | - (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex range:(NSRange)range withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 252 | - (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 253 | - (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withFirstKey:(id)firstKey arguments:(va_list)varArgsList; 254 | 255 | - (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeys:(id *)keys forCaptures:(int *)captures count:(NSUInteger)count; 256 | 257 | #ifdef _RKL_BLOCKS_ENABLED 258 | 259 | - (BOOL)RKL_METHOD_PREPEND(enumerateStringsMatchedByRegex):(NSString *)regex usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 260 | - (BOOL)RKL_METHOD_PREPEND(enumerateStringsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 261 | 262 | - (BOOL)RKL_METHOD_PREPEND(enumerateStringsSeparatedByRegex):(NSString *)regex usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 263 | - (BOOL)RKL_METHOD_PREPEND(enumerateStringsSeparatedByRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 264 | 265 | - (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 266 | - (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 267 | 268 | #endif // _RKL_BLOCKS_ENABLED 269 | 270 | @end 271 | 272 | @interface NSMutableString (RegexKitLiteAdditions) 273 | 274 | - (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement; 275 | - (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement range:(NSRange)searchRange; 276 | - (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement options:(RKLRegexOptions)options range:(NSRange)searchRange error:(NSError **)error; 277 | 278 | //// >= 4.0 279 | 280 | #ifdef _RKL_BLOCKS_ENABLED 281 | 282 | - (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 283 | - (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 284 | 285 | #endif // _RKL_BLOCKS_ENABLED 286 | 287 | @end 288 | 289 | #endif // __OBJC__ 290 | 291 | #endif // _REGEXKITLITE_H_ 292 | 293 | #ifdef __cplusplus 294 | } // extern "C" 295 | #endif 296 | -------------------------------------------------------------------------------- /RegularExpressions/RegularExpressions.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | CE318A311C5F2D4D00952A3A /* XWRegularExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = CE318A301C5F2D4D00952A3A /* XWRegularExpression.m */; }; 11 | CE318A341C5F45B500952A3A /* XWTextHightViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE318A331C5F45B500952A3A /* XWTextHightViewController.m */; }; 12 | CE318A391C5F62E000952A3A /* RegexKitLite.m in Sources */ = {isa = PBXBuildFile; fileRef = CE318A381C5F62E000952A3A /* RegexKitLite.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 13 | CE318A3C1C5F633400952A3A /* XWTextPart.m in Sources */ = {isa = PBXBuildFile; fileRef = CE318A3B1C5F633400952A3A /* XWTextPart.m */; }; 14 | CE318C401C6105F100952A3A /* libicucore.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CE318C3F1C6105F100952A3A /* libicucore.tbd */; }; 15 | CE9E6A521C5EF0CB002F1BE4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CE9E6A511C5EF0CB002F1BE4 /* main.m */; }; 16 | CE9E6A551C5EF0CB002F1BE4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CE9E6A541C5EF0CB002F1BE4 /* AppDelegate.m */; }; 17 | CE9E6A581C5EF0CB002F1BE4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE9E6A571C5EF0CB002F1BE4 /* ViewController.m */; }; 18 | CE9E6A5B1C5EF0CB002F1BE4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE9E6A591C5EF0CB002F1BE4 /* Main.storyboard */; }; 19 | CE9E6A5D1C5EF0CB002F1BE4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE9E6A5C1C5EF0CB002F1BE4 /* Assets.xcassets */; }; 20 | CE9E6A601C5EF0CB002F1BE4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE9E6A5E1C5EF0CB002F1BE4 /* LaunchScreen.storyboard */; }; 21 | CE9E6A6B1C5EF0CC002F1BE4 /* RegularExpressionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CE9E6A6A1C5EF0CC002F1BE4 /* RegularExpressionsTests.m */; }; 22 | CE9E6A761C5EF0CC002F1BE4 /* RegularExpressionsUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = CE9E6A751C5EF0CC002F1BE4 /* RegularExpressionsUITests.m */; }; 23 | CE9E6A8F1C5EF453002F1BE4 /* XWTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CE9E6A8D1C5EF453002F1BE4 /* XWTableViewCell.m */; }; 24 | CE9E6A901C5EF453002F1BE4 /* XWTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = CE9E6A8E1C5EF453002F1BE4 /* XWTableViewCell.xib */; }; 25 | CE9E6A941C5EF598002F1BE4 /* XWViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE9E6A921C5EF598002F1BE4 /* XWViewController.m */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXContainerItemProxy section */ 29 | CE9E6A671C5EF0CC002F1BE4 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = CE9E6A451C5EF0CB002F1BE4 /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = CE9E6A4C1C5EF0CB002F1BE4; 34 | remoteInfo = RegularExpressions; 35 | }; 36 | CE9E6A721C5EF0CC002F1BE4 /* PBXContainerItemProxy */ = { 37 | isa = PBXContainerItemProxy; 38 | containerPortal = CE9E6A451C5EF0CB002F1BE4 /* Project object */; 39 | proxyType = 1; 40 | remoteGlobalIDString = CE9E6A4C1C5EF0CB002F1BE4; 41 | remoteInfo = RegularExpressions; 42 | }; 43 | /* End PBXContainerItemProxy section */ 44 | 45 | /* Begin PBXFileReference section */ 46 | CE318A2F1C5F2D4D00952A3A /* XWRegularExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XWRegularExpression.h; sourceTree = ""; }; 47 | CE318A301C5F2D4D00952A3A /* XWRegularExpression.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XWRegularExpression.m; sourceTree = ""; }; 48 | CE318A321C5F45B500952A3A /* XWTextHightViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XWTextHightViewController.h; sourceTree = ""; }; 49 | CE318A331C5F45B500952A3A /* XWTextHightViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XWTextHightViewController.m; sourceTree = ""; }; 50 | CE318A361C5F4F5E00952A3A /* RegularExpression_PrefixHeader.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegularExpression_PrefixHeader.pch; sourceTree = ""; }; 51 | CE318A371C5F62E000952A3A /* RegexKitLite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegexKitLite.h; sourceTree = ""; }; 52 | CE318A381C5F62E000952A3A /* RegexKitLite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegexKitLite.m; sourceTree = ""; }; 53 | CE318A3A1C5F633400952A3A /* XWTextPart.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XWTextPart.h; sourceTree = ""; }; 54 | CE318A3B1C5F633400952A3A /* XWTextPart.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XWTextPart.m; sourceTree = ""; }; 55 | CE318C3F1C6105F100952A3A /* libicucore.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libicucore.tbd; path = usr/lib/libicucore.tbd; sourceTree = SDKROOT; }; 56 | CE9E6A4D1C5EF0CB002F1BE4 /* RegularExpressions.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RegularExpressions.app; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | CE9E6A511C5EF0CB002F1BE4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 58 | CE9E6A531C5EF0CB002F1BE4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 59 | CE9E6A541C5EF0CB002F1BE4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 60 | CE9E6A561C5EF0CB002F1BE4 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ViewController.h; path = ../../ViewController.h; sourceTree = ""; }; 61 | CE9E6A571C5EF0CB002F1BE4 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = ViewController.m; path = ../../ViewController.m; sourceTree = ""; }; 62 | CE9E6A5A1C5EF0CB002F1BE4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 63 | CE9E6A5C1C5EF0CB002F1BE4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 64 | CE9E6A5F1C5EF0CB002F1BE4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 65 | CE9E6A611C5EF0CB002F1BE4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 66 | CE9E6A661C5EF0CC002F1BE4 /* RegularExpressionsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RegularExpressionsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 67 | CE9E6A6A1C5EF0CC002F1BE4 /* RegularExpressionsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RegularExpressionsTests.m; sourceTree = ""; }; 68 | CE9E6A6C1C5EF0CC002F1BE4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 69 | CE9E6A711C5EF0CC002F1BE4 /* RegularExpressionsUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RegularExpressionsUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 70 | CE9E6A751C5EF0CC002F1BE4 /* RegularExpressionsUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RegularExpressionsUITests.m; sourceTree = ""; }; 71 | CE9E6A771C5EF0CC002F1BE4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 72 | CE9E6A8C1C5EF453002F1BE4 /* XWTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XWTableViewCell.h; sourceTree = ""; }; 73 | CE9E6A8D1C5EF453002F1BE4 /* XWTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XWTableViewCell.m; sourceTree = ""; }; 74 | CE9E6A8E1C5EF453002F1BE4 /* XWTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = XWTableViewCell.xib; sourceTree = ""; }; 75 | CE9E6A911C5EF598002F1BE4 /* XWViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XWViewController.h; sourceTree = ""; }; 76 | CE9E6A921C5EF598002F1BE4 /* XWViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XWViewController.m; sourceTree = ""; }; 77 | /* End PBXFileReference section */ 78 | 79 | /* Begin PBXFrameworksBuildPhase section */ 80 | CE9E6A4A1C5EF0CB002F1BE4 /* Frameworks */ = { 81 | isa = PBXFrameworksBuildPhase; 82 | buildActionMask = 2147483647; 83 | files = ( 84 | CE318C401C6105F100952A3A /* libicucore.tbd in Frameworks */, 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | CE9E6A631C5EF0CC002F1BE4 /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | CE9E6A6E1C5EF0CC002F1BE4 /* Frameworks */ = { 96 | isa = PBXFrameworksBuildPhase; 97 | buildActionMask = 2147483647; 98 | files = ( 99 | ); 100 | runOnlyForDeploymentPostprocessing = 0; 101 | }; 102 | /* End PBXFrameworksBuildPhase section */ 103 | 104 | /* Begin PBXGroup section */ 105 | CE9E6A441C5EF0CB002F1BE4 = { 106 | isa = PBXGroup; 107 | children = ( 108 | CE318C3F1C6105F100952A3A /* libicucore.tbd */, 109 | CE9E6A4F1C5EF0CB002F1BE4 /* RegularExpressions */, 110 | CE9E6A691C5EF0CC002F1BE4 /* RegularExpressionsTests */, 111 | CE9E6A741C5EF0CC002F1BE4 /* RegularExpressionsUITests */, 112 | CE9E6A4E1C5EF0CB002F1BE4 /* Products */, 113 | ); 114 | sourceTree = ""; 115 | }; 116 | CE9E6A4E1C5EF0CB002F1BE4 /* Products */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | CE9E6A4D1C5EF0CB002F1BE4 /* RegularExpressions.app */, 120 | CE9E6A661C5EF0CC002F1BE4 /* RegularExpressionsTests.xctest */, 121 | CE9E6A711C5EF0CC002F1BE4 /* RegularExpressionsUITests.xctest */, 122 | ); 123 | name = Products; 124 | sourceTree = ""; 125 | }; 126 | CE9E6A4F1C5EF0CB002F1BE4 /* RegularExpressions */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | CE9E6A881C5EF3F8002F1BE4 /* MVC */, 130 | CE9E6A871C5EF3D9002F1BE4 /* Lib */, 131 | CE9E6A531C5EF0CB002F1BE4 /* AppDelegate.h */, 132 | CE9E6A541C5EF0CB002F1BE4 /* AppDelegate.m */, 133 | CE9E6A591C5EF0CB002F1BE4 /* Main.storyboard */, 134 | CE9E6A5C1C5EF0CB002F1BE4 /* Assets.xcassets */, 135 | CE9E6A5E1C5EF0CB002F1BE4 /* LaunchScreen.storyboard */, 136 | CE9E6A611C5EF0CB002F1BE4 /* Info.plist */, 137 | CE9E6A501C5EF0CB002F1BE4 /* Supporting Files */, 138 | ); 139 | path = RegularExpressions; 140 | sourceTree = ""; 141 | }; 142 | CE9E6A501C5EF0CB002F1BE4 /* Supporting Files */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | CE9E6A511C5EF0CB002F1BE4 /* main.m */, 146 | CE318A361C5F4F5E00952A3A /* RegularExpression_PrefixHeader.pch */, 147 | ); 148 | name = "Supporting Files"; 149 | sourceTree = ""; 150 | }; 151 | CE9E6A691C5EF0CC002F1BE4 /* RegularExpressionsTests */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | CE9E6A6A1C5EF0CC002F1BE4 /* RegularExpressionsTests.m */, 155 | CE9E6A6C1C5EF0CC002F1BE4 /* Info.plist */, 156 | ); 157 | path = RegularExpressionsTests; 158 | sourceTree = ""; 159 | }; 160 | CE9E6A741C5EF0CC002F1BE4 /* RegularExpressionsUITests */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | CE9E6A751C5EF0CC002F1BE4 /* RegularExpressionsUITests.m */, 164 | CE9E6A771C5EF0CC002F1BE4 /* Info.plist */, 165 | ); 166 | path = RegularExpressionsUITests; 167 | sourceTree = ""; 168 | }; 169 | CE9E6A871C5EF3D9002F1BE4 /* Lib */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | CE318A371C5F62E000952A3A /* RegexKitLite.h */, 173 | CE318A381C5F62E000952A3A /* RegexKitLite.m */, 174 | CE318A2F1C5F2D4D00952A3A /* XWRegularExpression.h */, 175 | CE318A301C5F2D4D00952A3A /* XWRegularExpression.m */, 176 | ); 177 | name = Lib; 178 | sourceTree = ""; 179 | }; 180 | CE9E6A881C5EF3F8002F1BE4 /* MVC */ = { 181 | isa = PBXGroup; 182 | children = ( 183 | CE9E6A891C5EF41F002F1BE4 /* Controller */, 184 | CE9E6A8A1C5EF41F002F1BE4 /* Model */, 185 | CE9E6A8B1C5EF41F002F1BE4 /* View */, 186 | ); 187 | path = MVC; 188 | sourceTree = ""; 189 | }; 190 | CE9E6A891C5EF41F002F1BE4 /* Controller */ = { 191 | isa = PBXGroup; 192 | children = ( 193 | CE9E6A561C5EF0CB002F1BE4 /* ViewController.h */, 194 | CE9E6A571C5EF0CB002F1BE4 /* ViewController.m */, 195 | CE9E6A911C5EF598002F1BE4 /* XWViewController.h */, 196 | CE9E6A921C5EF598002F1BE4 /* XWViewController.m */, 197 | CE318A321C5F45B500952A3A /* XWTextHightViewController.h */, 198 | CE318A331C5F45B500952A3A /* XWTextHightViewController.m */, 199 | ); 200 | path = Controller; 201 | sourceTree = ""; 202 | }; 203 | CE9E6A8A1C5EF41F002F1BE4 /* Model */ = { 204 | isa = PBXGroup; 205 | children = ( 206 | CE318A3A1C5F633400952A3A /* XWTextPart.h */, 207 | CE318A3B1C5F633400952A3A /* XWTextPart.m */, 208 | ); 209 | path = Model; 210 | sourceTree = ""; 211 | }; 212 | CE9E6A8B1C5EF41F002F1BE4 /* View */ = { 213 | isa = PBXGroup; 214 | children = ( 215 | CE9E6A8C1C5EF453002F1BE4 /* XWTableViewCell.h */, 216 | CE9E6A8D1C5EF453002F1BE4 /* XWTableViewCell.m */, 217 | CE9E6A8E1C5EF453002F1BE4 /* XWTableViewCell.xib */, 218 | ); 219 | path = View; 220 | sourceTree = ""; 221 | }; 222 | /* End PBXGroup section */ 223 | 224 | /* Begin PBXNativeTarget section */ 225 | CE9E6A4C1C5EF0CB002F1BE4 /* RegularExpressions */ = { 226 | isa = PBXNativeTarget; 227 | buildConfigurationList = CE9E6A7A1C5EF0CC002F1BE4 /* Build configuration list for PBXNativeTarget "RegularExpressions" */; 228 | buildPhases = ( 229 | CE9E6A491C5EF0CB002F1BE4 /* Sources */, 230 | CE9E6A4A1C5EF0CB002F1BE4 /* Frameworks */, 231 | CE9E6A4B1C5EF0CB002F1BE4 /* Resources */, 232 | ); 233 | buildRules = ( 234 | ); 235 | dependencies = ( 236 | ); 237 | name = RegularExpressions; 238 | productName = RegularExpressions; 239 | productReference = CE9E6A4D1C5EF0CB002F1BE4 /* RegularExpressions.app */; 240 | productType = "com.apple.product-type.application"; 241 | }; 242 | CE9E6A651C5EF0CC002F1BE4 /* RegularExpressionsTests */ = { 243 | isa = PBXNativeTarget; 244 | buildConfigurationList = CE9E6A7D1C5EF0CC002F1BE4 /* Build configuration list for PBXNativeTarget "RegularExpressionsTests" */; 245 | buildPhases = ( 246 | CE9E6A621C5EF0CC002F1BE4 /* Sources */, 247 | CE9E6A631C5EF0CC002F1BE4 /* Frameworks */, 248 | CE9E6A641C5EF0CC002F1BE4 /* Resources */, 249 | ); 250 | buildRules = ( 251 | ); 252 | dependencies = ( 253 | CE9E6A681C5EF0CC002F1BE4 /* PBXTargetDependency */, 254 | ); 255 | name = RegularExpressionsTests; 256 | productName = RegularExpressionsTests; 257 | productReference = CE9E6A661C5EF0CC002F1BE4 /* RegularExpressionsTests.xctest */; 258 | productType = "com.apple.product-type.bundle.unit-test"; 259 | }; 260 | CE9E6A701C5EF0CC002F1BE4 /* RegularExpressionsUITests */ = { 261 | isa = PBXNativeTarget; 262 | buildConfigurationList = CE9E6A801C5EF0CC002F1BE4 /* Build configuration list for PBXNativeTarget "RegularExpressionsUITests" */; 263 | buildPhases = ( 264 | CE9E6A6D1C5EF0CC002F1BE4 /* Sources */, 265 | CE9E6A6E1C5EF0CC002F1BE4 /* Frameworks */, 266 | CE9E6A6F1C5EF0CC002F1BE4 /* Resources */, 267 | ); 268 | buildRules = ( 269 | ); 270 | dependencies = ( 271 | CE9E6A731C5EF0CC002F1BE4 /* PBXTargetDependency */, 272 | ); 273 | name = RegularExpressionsUITests; 274 | productName = RegularExpressionsUITests; 275 | productReference = CE9E6A711C5EF0CC002F1BE4 /* RegularExpressionsUITests.xctest */; 276 | productType = "com.apple.product-type.bundle.ui-testing"; 277 | }; 278 | /* End PBXNativeTarget section */ 279 | 280 | /* Begin PBXProject section */ 281 | CE9E6A451C5EF0CB002F1BE4 /* Project object */ = { 282 | isa = PBXProject; 283 | attributes = { 284 | CLASSPREFIX = XW; 285 | LastUpgradeCheck = 0710; 286 | ORGANIZATIONNAME = EdwinXiang; 287 | TargetAttributes = { 288 | CE9E6A4C1C5EF0CB002F1BE4 = { 289 | CreatedOnToolsVersion = 7.1; 290 | }; 291 | CE9E6A651C5EF0CC002F1BE4 = { 292 | CreatedOnToolsVersion = 7.1; 293 | TestTargetID = CE9E6A4C1C5EF0CB002F1BE4; 294 | }; 295 | CE9E6A701C5EF0CC002F1BE4 = { 296 | CreatedOnToolsVersion = 7.1; 297 | TestTargetID = CE9E6A4C1C5EF0CB002F1BE4; 298 | }; 299 | }; 300 | }; 301 | buildConfigurationList = CE9E6A481C5EF0CB002F1BE4 /* Build configuration list for PBXProject "RegularExpressions" */; 302 | compatibilityVersion = "Xcode 3.2"; 303 | developmentRegion = English; 304 | hasScannedForEncodings = 0; 305 | knownRegions = ( 306 | en, 307 | Base, 308 | ); 309 | mainGroup = CE9E6A441C5EF0CB002F1BE4; 310 | productRefGroup = CE9E6A4E1C5EF0CB002F1BE4 /* Products */; 311 | projectDirPath = ""; 312 | projectRoot = ""; 313 | targets = ( 314 | CE9E6A4C1C5EF0CB002F1BE4 /* RegularExpressions */, 315 | CE9E6A651C5EF0CC002F1BE4 /* RegularExpressionsTests */, 316 | CE9E6A701C5EF0CC002F1BE4 /* RegularExpressionsUITests */, 317 | ); 318 | }; 319 | /* End PBXProject section */ 320 | 321 | /* Begin PBXResourcesBuildPhase section */ 322 | CE9E6A4B1C5EF0CB002F1BE4 /* Resources */ = { 323 | isa = PBXResourcesBuildPhase; 324 | buildActionMask = 2147483647; 325 | files = ( 326 | CE9E6A601C5EF0CB002F1BE4 /* LaunchScreen.storyboard in Resources */, 327 | CE9E6A5D1C5EF0CB002F1BE4 /* Assets.xcassets in Resources */, 328 | CE9E6A901C5EF453002F1BE4 /* XWTableViewCell.xib in Resources */, 329 | CE9E6A5B1C5EF0CB002F1BE4 /* Main.storyboard in Resources */, 330 | ); 331 | runOnlyForDeploymentPostprocessing = 0; 332 | }; 333 | CE9E6A641C5EF0CC002F1BE4 /* Resources */ = { 334 | isa = PBXResourcesBuildPhase; 335 | buildActionMask = 2147483647; 336 | files = ( 337 | ); 338 | runOnlyForDeploymentPostprocessing = 0; 339 | }; 340 | CE9E6A6F1C5EF0CC002F1BE4 /* Resources */ = { 341 | isa = PBXResourcesBuildPhase; 342 | buildActionMask = 2147483647; 343 | files = ( 344 | ); 345 | runOnlyForDeploymentPostprocessing = 0; 346 | }; 347 | /* End PBXResourcesBuildPhase section */ 348 | 349 | /* Begin PBXSourcesBuildPhase section */ 350 | CE9E6A491C5EF0CB002F1BE4 /* Sources */ = { 351 | isa = PBXSourcesBuildPhase; 352 | buildActionMask = 2147483647; 353 | files = ( 354 | CE9E6A8F1C5EF453002F1BE4 /* XWTableViewCell.m in Sources */, 355 | CE318A341C5F45B500952A3A /* XWTextHightViewController.m in Sources */, 356 | CE318A391C5F62E000952A3A /* RegexKitLite.m in Sources */, 357 | CE9E6A581C5EF0CB002F1BE4 /* ViewController.m in Sources */, 358 | CE318A311C5F2D4D00952A3A /* XWRegularExpression.m in Sources */, 359 | CE318A3C1C5F633400952A3A /* XWTextPart.m in Sources */, 360 | CE9E6A551C5EF0CB002F1BE4 /* AppDelegate.m in Sources */, 361 | CE9E6A941C5EF598002F1BE4 /* XWViewController.m in Sources */, 362 | CE9E6A521C5EF0CB002F1BE4 /* main.m in Sources */, 363 | ); 364 | runOnlyForDeploymentPostprocessing = 0; 365 | }; 366 | CE9E6A621C5EF0CC002F1BE4 /* Sources */ = { 367 | isa = PBXSourcesBuildPhase; 368 | buildActionMask = 2147483647; 369 | files = ( 370 | CE9E6A6B1C5EF0CC002F1BE4 /* RegularExpressionsTests.m in Sources */, 371 | ); 372 | runOnlyForDeploymentPostprocessing = 0; 373 | }; 374 | CE9E6A6D1C5EF0CC002F1BE4 /* Sources */ = { 375 | isa = PBXSourcesBuildPhase; 376 | buildActionMask = 2147483647; 377 | files = ( 378 | CE9E6A761C5EF0CC002F1BE4 /* RegularExpressionsUITests.m in Sources */, 379 | ); 380 | runOnlyForDeploymentPostprocessing = 0; 381 | }; 382 | /* End PBXSourcesBuildPhase section */ 383 | 384 | /* Begin PBXTargetDependency section */ 385 | CE9E6A681C5EF0CC002F1BE4 /* PBXTargetDependency */ = { 386 | isa = PBXTargetDependency; 387 | target = CE9E6A4C1C5EF0CB002F1BE4 /* RegularExpressions */; 388 | targetProxy = CE9E6A671C5EF0CC002F1BE4 /* PBXContainerItemProxy */; 389 | }; 390 | CE9E6A731C5EF0CC002F1BE4 /* PBXTargetDependency */ = { 391 | isa = PBXTargetDependency; 392 | target = CE9E6A4C1C5EF0CB002F1BE4 /* RegularExpressions */; 393 | targetProxy = CE9E6A721C5EF0CC002F1BE4 /* PBXContainerItemProxy */; 394 | }; 395 | /* End PBXTargetDependency section */ 396 | 397 | /* Begin PBXVariantGroup section */ 398 | CE9E6A591C5EF0CB002F1BE4 /* Main.storyboard */ = { 399 | isa = PBXVariantGroup; 400 | children = ( 401 | CE9E6A5A1C5EF0CB002F1BE4 /* Base */, 402 | ); 403 | name = Main.storyboard; 404 | sourceTree = ""; 405 | }; 406 | CE9E6A5E1C5EF0CB002F1BE4 /* LaunchScreen.storyboard */ = { 407 | isa = PBXVariantGroup; 408 | children = ( 409 | CE9E6A5F1C5EF0CB002F1BE4 /* Base */, 410 | ); 411 | name = LaunchScreen.storyboard; 412 | sourceTree = ""; 413 | }; 414 | /* End PBXVariantGroup section */ 415 | 416 | /* Begin XCBuildConfiguration section */ 417 | CE9E6A781C5EF0CC002F1BE4 /* Debug */ = { 418 | isa = XCBuildConfiguration; 419 | buildSettings = { 420 | ALWAYS_SEARCH_USER_PATHS = NO; 421 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 422 | CLANG_CXX_LIBRARY = "libc++"; 423 | CLANG_ENABLE_MODULES = YES; 424 | CLANG_ENABLE_OBJC_ARC = YES; 425 | CLANG_WARN_BOOL_CONVERSION = YES; 426 | CLANG_WARN_CONSTANT_CONVERSION = YES; 427 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 428 | CLANG_WARN_EMPTY_BODY = YES; 429 | CLANG_WARN_ENUM_CONVERSION = YES; 430 | CLANG_WARN_INT_CONVERSION = YES; 431 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 432 | CLANG_WARN_UNREACHABLE_CODE = YES; 433 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 434 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 435 | COPY_PHASE_STRIP = NO; 436 | DEBUG_INFORMATION_FORMAT = dwarf; 437 | ENABLE_STRICT_OBJC_MSGSEND = YES; 438 | ENABLE_TESTABILITY = YES; 439 | GCC_C_LANGUAGE_STANDARD = gnu99; 440 | GCC_DYNAMIC_NO_PIC = NO; 441 | GCC_NO_COMMON_BLOCKS = YES; 442 | GCC_OPTIMIZATION_LEVEL = 0; 443 | GCC_PREPROCESSOR_DEFINITIONS = ( 444 | "DEBUG=1", 445 | "$(inherited)", 446 | ); 447 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 448 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 449 | GCC_WARN_UNDECLARED_SELECTOR = YES; 450 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 451 | GCC_WARN_UNUSED_FUNCTION = YES; 452 | GCC_WARN_UNUSED_VARIABLE = YES; 453 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 454 | MTL_ENABLE_DEBUG_INFO = YES; 455 | ONLY_ACTIVE_ARCH = YES; 456 | SDKROOT = iphoneos; 457 | }; 458 | name = Debug; 459 | }; 460 | CE9E6A791C5EF0CC002F1BE4 /* Release */ = { 461 | isa = XCBuildConfiguration; 462 | buildSettings = { 463 | ALWAYS_SEARCH_USER_PATHS = NO; 464 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 465 | CLANG_CXX_LIBRARY = "libc++"; 466 | CLANG_ENABLE_MODULES = YES; 467 | CLANG_ENABLE_OBJC_ARC = YES; 468 | CLANG_WARN_BOOL_CONVERSION = YES; 469 | CLANG_WARN_CONSTANT_CONVERSION = YES; 470 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 471 | CLANG_WARN_EMPTY_BODY = YES; 472 | CLANG_WARN_ENUM_CONVERSION = YES; 473 | CLANG_WARN_INT_CONVERSION = YES; 474 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 475 | CLANG_WARN_UNREACHABLE_CODE = YES; 476 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 477 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 478 | COPY_PHASE_STRIP = NO; 479 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 480 | ENABLE_NS_ASSERTIONS = NO; 481 | ENABLE_STRICT_OBJC_MSGSEND = YES; 482 | GCC_C_LANGUAGE_STANDARD = gnu99; 483 | GCC_NO_COMMON_BLOCKS = YES; 484 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 485 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 486 | GCC_WARN_UNDECLARED_SELECTOR = YES; 487 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 488 | GCC_WARN_UNUSED_FUNCTION = YES; 489 | GCC_WARN_UNUSED_VARIABLE = YES; 490 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 491 | MTL_ENABLE_DEBUG_INFO = NO; 492 | SDKROOT = iphoneos; 493 | VALIDATE_PRODUCT = YES; 494 | }; 495 | name = Release; 496 | }; 497 | CE9E6A7B1C5EF0CC002F1BE4 /* Debug */ = { 498 | isa = XCBuildConfiguration; 499 | buildSettings = { 500 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 501 | GCC_PREFIX_HEADER = /Users/WeiXiang/Desktop/RegularExpressionOne/RegularExpressions/RegularExpressions/RegularExpression_PrefixHeader.pch; 502 | INFOPLIST_FILE = RegularExpressions/Info.plist; 503 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 504 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 505 | PRODUCT_BUNDLE_IDENTIFIER = com.Edwin.hxl.RegularExpressions; 506 | PRODUCT_NAME = "$(TARGET_NAME)"; 507 | VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386"; 508 | }; 509 | name = Debug; 510 | }; 511 | CE9E6A7C1C5EF0CC002F1BE4 /* Release */ = { 512 | isa = XCBuildConfiguration; 513 | buildSettings = { 514 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 515 | GCC_PREFIX_HEADER = /Users/WeiXiang/Desktop/RegularExpressionOne/RegularExpressions/RegularExpressions/RegularExpression_PrefixHeader.pch; 516 | INFOPLIST_FILE = RegularExpressions/Info.plist; 517 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 518 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 519 | PRODUCT_BUNDLE_IDENTIFIER = com.Edwin.hxl.RegularExpressions; 520 | PRODUCT_NAME = "$(TARGET_NAME)"; 521 | VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386"; 522 | }; 523 | name = Release; 524 | }; 525 | CE9E6A7E1C5EF0CC002F1BE4 /* Debug */ = { 526 | isa = XCBuildConfiguration; 527 | buildSettings = { 528 | BUNDLE_LOADER = "$(TEST_HOST)"; 529 | INFOPLIST_FILE = RegularExpressionsTests/Info.plist; 530 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 531 | PRODUCT_BUNDLE_IDENTIFIER = com.Edwin.hxl.RegularExpressionsTests; 532 | PRODUCT_NAME = "$(TARGET_NAME)"; 533 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RegularExpressions.app/RegularExpressions"; 534 | }; 535 | name = Debug; 536 | }; 537 | CE9E6A7F1C5EF0CC002F1BE4 /* Release */ = { 538 | isa = XCBuildConfiguration; 539 | buildSettings = { 540 | BUNDLE_LOADER = "$(TEST_HOST)"; 541 | INFOPLIST_FILE = RegularExpressionsTests/Info.plist; 542 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 543 | PRODUCT_BUNDLE_IDENTIFIER = com.Edwin.hxl.RegularExpressionsTests; 544 | PRODUCT_NAME = "$(TARGET_NAME)"; 545 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RegularExpressions.app/RegularExpressions"; 546 | }; 547 | name = Release; 548 | }; 549 | CE9E6A811C5EF0CC002F1BE4 /* Debug */ = { 550 | isa = XCBuildConfiguration; 551 | buildSettings = { 552 | INFOPLIST_FILE = RegularExpressionsUITests/Info.plist; 553 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 554 | PRODUCT_BUNDLE_IDENTIFIER = com.Edwin.hxl.RegularExpressionsUITests; 555 | PRODUCT_NAME = "$(TARGET_NAME)"; 556 | TEST_TARGET_NAME = RegularExpressions; 557 | USES_XCTRUNNER = YES; 558 | }; 559 | name = Debug; 560 | }; 561 | CE9E6A821C5EF0CC002F1BE4 /* Release */ = { 562 | isa = XCBuildConfiguration; 563 | buildSettings = { 564 | INFOPLIST_FILE = RegularExpressionsUITests/Info.plist; 565 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 566 | PRODUCT_BUNDLE_IDENTIFIER = com.Edwin.hxl.RegularExpressionsUITests; 567 | PRODUCT_NAME = "$(TARGET_NAME)"; 568 | TEST_TARGET_NAME = RegularExpressions; 569 | USES_XCTRUNNER = YES; 570 | }; 571 | name = Release; 572 | }; 573 | /* End XCBuildConfiguration section */ 574 | 575 | /* Begin XCConfigurationList section */ 576 | CE9E6A481C5EF0CB002F1BE4 /* Build configuration list for PBXProject "RegularExpressions" */ = { 577 | isa = XCConfigurationList; 578 | buildConfigurations = ( 579 | CE9E6A781C5EF0CC002F1BE4 /* Debug */, 580 | CE9E6A791C5EF0CC002F1BE4 /* Release */, 581 | ); 582 | defaultConfigurationIsVisible = 0; 583 | defaultConfigurationName = Release; 584 | }; 585 | CE9E6A7A1C5EF0CC002F1BE4 /* Build configuration list for PBXNativeTarget "RegularExpressions" */ = { 586 | isa = XCConfigurationList; 587 | buildConfigurations = ( 588 | CE9E6A7B1C5EF0CC002F1BE4 /* Debug */, 589 | CE9E6A7C1C5EF0CC002F1BE4 /* Release */, 590 | ); 591 | defaultConfigurationIsVisible = 0; 592 | defaultConfigurationName = Release; 593 | }; 594 | CE9E6A7D1C5EF0CC002F1BE4 /* Build configuration list for PBXNativeTarget "RegularExpressionsTests" */ = { 595 | isa = XCConfigurationList; 596 | buildConfigurations = ( 597 | CE9E6A7E1C5EF0CC002F1BE4 /* Debug */, 598 | CE9E6A7F1C5EF0CC002F1BE4 /* Release */, 599 | ); 600 | defaultConfigurationIsVisible = 0; 601 | defaultConfigurationName = Release; 602 | }; 603 | CE9E6A801C5EF0CC002F1BE4 /* Build configuration list for PBXNativeTarget "RegularExpressionsUITests" */ = { 604 | isa = XCConfigurationList; 605 | buildConfigurations = ( 606 | CE9E6A811C5EF0CC002F1BE4 /* Debug */, 607 | CE9E6A821C5EF0CC002F1BE4 /* Release */, 608 | ); 609 | defaultConfigurationIsVisible = 0; 610 | defaultConfigurationName = Release; 611 | }; 612 | /* End XCConfigurationList section */ 613 | }; 614 | rootObject = CE9E6A451C5EF0CB002F1BE4 /* Project object */; 615 | } 616 | --------------------------------------------------------------------------------