Skip to content

Instantly share code, notes, and snippets.

View dr-skot's full-sized avatar

Scott Shepherd dr-skot

View GitHub Profile
@dr-skot
dr-skot / Regex.swift
Last active March 9, 2016 13:02 — forked from ningsuhen/Regex.swift
Swift extension that adds convenient regex methods to String. Forked from ningsuhen & cleaned up for Swift 2.0
import Foundation
struct Regex {
var pattern: String {
didSet { updateRegex() }
}
var expressionOptions: NSRegularExpressionOptions {
didSet { updateRegex() }
}
var matchingOptions: NSMatchingOptions