Skip to content

Instantly share code, notes, and snippets.

@feelingplace
feelingplace / Regexp.swift
Last active March 11, 2016 13:06 — forked from takafumir/Regexp.swift
Swift utility class for regular expression
import Foundation
class Regexp {
let internalRegexp: NSRegularExpression
let pattern: String
init(_ pattern: String) {
self.pattern = pattern
do {
self.internalRegexp = try NSRegularExpression(pattern: pattern, options: NSRegularExpressionOptions.CaseInsensitive)