SwiftyRegex
所属分类:数值算法/人工智能
开发工具:Swift
文件大小:0KB
下载次数:0
上传日期:2016-12-04 16:38:51
上 传 者:
sh-1993
说明: Swift编程语言的正则表达式。
(Regular Expression for Swift programming language.)
文件列表:
SwiftyRegex.xcodeproj/
SwiftyRegex/
SwiftyRegexTests/
# SwiftyRegex
Regular Expression for Swift programming language.
## Samples
### is match
"123456" =~ "^\\d+$" // true
### replace
"aaa".sub("a", newStr: "2") // "2aa"
### replace all
"aaa".gsub("a", newStr: "2") // "222"
### scan
"(123) 456-7890".scan("\\d+") // ["123", "456", "7890"]
### split
"aaa123bbb456ccc789ddd".split("\\d+") // ["aaa", "bbb", "ccc", "ddd"]
## Installation
### Carthage
Add the following to Carfile:
github "tylerlong/SwiftyRegex"
Run the following command to install:
carthage update --platform Mac
## License
MIT
Copyright 2015 Tyler Long
近期下载者:
相关文件:
收藏者: