Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 984 Bytes

README.md

File metadata and controls

30 lines (19 loc) · 984 Bytes

Onigmo

Build Status codecov.io

An Objective-C wrapper around Onigmo.

Installation

Carthage is currently the only supported installation method:

github "nerdishbynature/Onigmo"

Usage

Search in String

We tried to mimic NSRegularExpression as close as possible, currently this library has only a initialiser and matchesInString:error: method implemented.

let onigmoRegex = try OnigmoRegularExpression(pattern: "a(.*)b|[e-f]+", options: .Default)
let matches = try onigmoRegex.matchesInString("zzzzaffffffffb")
let firstRange = matches["0"].rangeValue // a NSRange for the first match

License

See LICENSE file for more details