Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kasei/SwiftRegex

Perl-like regex =~ operator for Swift
https://github.com/kasei/SwiftRegex

Last synced: about 1 month ago
JSON representation

Perl-like regex =~ operator for Swift

Awesome Lists containing this project

README

        

SwiftRegex
==========

Perl-like regex =~ operator for Swift
----------

This package implements a =~ string infix operator for use in testing regular expressions and retrieving sequences of matching sub-strings.

The regular expression matching is performed using NSRegularExpression.

### Example

```
for match in "Hello World" =~ "\\w+" {
println("matched: \(match)")
}
```

Prints:

```
matched: Hello
matched: World
```