Latest 0.1.0
Homepage https://github.com/sakiwei/ObjectiveCVerbalExpressions
License MIT
Platforms ios 4.0, osx 10.7, requires ARC
Authors

VerbalExpressions Objective C Library

VerbalExpressions is an Objective C library that helps to construct difficult regular expressions.

Requirements

VerbalExpressions requires either iOS >= 4.3, or Mac OS >= 10.7. Also, it uses ARC.

Instalation

From Cocoapods

pod 'VerbalExpressions'

From source

Drags VerbalExpressions.h and VerbalExpressions.m into your projects and import "VerbalExpressions.h"

Examples

// url matches
VerbalExpressions *tester = [[[[[[[VerEX() startOfLine] then:@"http"] maybe:@"s"] then:@"://"] maybe:@"www."] anythingBut:@" "] endOfLine];

NSString *testMe = @"https://www.google.com/";
if( [tester test:testMe] ){
    NSLog(@"We have a correct URL ");
}else{
    NSLog(@"The URL is incorrect");
}

// replace string
NSString *replaceMe = @"Replace bird with a duck";
tester = [VerEX() find:@"bird"];
NSString *result = [tester replace:replaceMe by:@"duck"];
NSLog(@"result = %@",result);

// shorthand for string replace
result = [[VerEX() find:@"red"] replace:@"We have a red house" by:@"blue"];
NSLog(@"result = %@",result); 

Latest podspec

{
    "name": "VerbalExpressions",
    "version": "0.1.0",
    "summary": "VerbalExpressions is an Objective C library that helps to construct difficult regular expressions.",
    "homepage": "https://github.com/sakiwei/ObjectiveCVerbalExpressions",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "sakiwei": "[email protected]"
    },
    "source": {
        "git": "https://github.com/sakiwei/ObjectiveCVerbalExpressions.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "4.0",
        "osx": "10.7"
    },
    "source_files": [
        "Classes",
        "classes/VerbalExpressions.{h,m}"
    ],
    "exclude_files": "Classes/Exclude",
    "requires_arc": true
}

Pin It on Pinterest

Share This