Skip to content

Instantly share code, notes, and snippets.

View uyu423's full-sized avatar

Yongwoo Yu (Yowu) uyu423

View GitHub Profile
@dotNetTree
dotNetTree / parse.swift
Created April 21, 2018 06:06
a simple querystring parser with nesting support
func parse(qs: String) -> [String: Any]? {
guard let regex = try? NSRegularExpression.init(
pattern: "(?:[^\\[\\]]+)",
options: NSRegularExpression.Options(rawValue: 0)
) else {
return nil
}
return qs