RegExCategories 1.0

RegExCategories 1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Unclaimed.


Downloads

Total745,523
Week0
Month0

Installs

Apps3,649
Pod Tries1
Test Targets376
Watch Apps3
powered by Segment

GitHub

Stars1,497
Watchers55
Forks204
Issues2
Contributors7
Pull Requests7

Code

Files2
LOCLines of Code 239


  • By
  • Josh Wright

Categories on NSRegularExpression that make regular expressions more concise in Objective-C.

This project makes regular expressions easy in Objective-C. Here is an example where four lines of code become one:

// Without this library NSString* string = @"I have 2 dogs."; NSRegularExpression *regex = [NSRegularExpression regular ExpressionWithPattern:@"\d+" options:NSRegularExpressionCaseInsensitive error:&error]; NSTextCheckingResult *match = [regex firstMatchInString:string options:0 range:NSMakeRange(0, [string length])]; BOOL isMatch = match != nil;

// With this library BOOL isMatch = [@"I have 2 dogs." isMatch:RX(@"\d+")];

Installation

pod 'RegExCategories'

Authors

Josh Wright

License

MIT