Latest 1.0.1
Homepage https://github.com/JanGorman/JGORegExpBuilder
License MIT
Authors

Build Status

Usage

You can use the builder in your project like this:

JGORegExpBuilder *builder = RegExpBuilder().exactly(1).of(@"p");
builder.test(@"p"); // YES
builder.test(@"q"); // NO

// If you want to access the underlying NSRegularExpression
NSRegularExpression *regularExpression = builder.regularExpression;

For simple matches use the builder directly. If you want to do more, simply access the NSRegularExpression, e.g. to search and replace inside a string.

See the JGORegExpBuilderTests.m file for some more examples of what you can do

Installation

JGORegExpBuilder is available through CocoaPods, to install
it simply add the following line to your Podfile:

pod "JGORegExpBuilder"

Inspiration

Based on the JavaScript builder by thebinarysearchtree.

License

JGORegExpBuilder is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "JGORegExpBuilder",
    "version": "1.0.1",
    "summary": "A delightful regular expression DSL",
    "homepage": "https://github.com/JanGorman/JGORegExpBuilder",
    "license": "MIT",
    "authors": {
        "Jan Gorman": "[email protected]"
    },
    "source": {
        "git": "https://github.com/JanGorman/JGORegExpBuilder.git",
        "tag": "1.0.1"
    },
    "social_media_url": "https://twitter.com/JanGorman",
    "source_files": "JGORegExpBuilder/JGORegExpBuilder.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This