Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ogulcan/SwiftRegEx
A playground to learn regular expressions with Swift
https://github.com/ogulcan/SwiftRegEx
regex regular-expression swift swift-3
Last synced: 3 months ago
JSON representation
A playground to learn regular expressions with Swift
- Host: GitHub
- URL: https://github.com/ogulcan/SwiftRegEx
- Owner: ogulcan
- License: gpl-3.0
- Created: 2017-09-28T11:30:32.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-03T14:55:00.000Z (about 7 years ago)
- Last Synced: 2024-04-22T12:31:10.178Z (7 months ago)
- Topics: regex, regular-expression, swift, swift-3
- Language: Swift
- Homepage:
- Size: 22.5 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-Swift-Playgrounds - Swift Regular Expressions - A playground to learn regular expressions with Swift. (Learning Swift: Advanced Topics)
README
# SwiftRegEx
A playground to learn regular expressions with Swift. We developers obviously know that it's not an easy work to use Regular Expressions. This is my challenge, I would like to add a new and efficient tool to my skills.
### Overview
Before I started, checked some documents also with a few tutorials and decided to go away with [this repository](https://github.com/zeeshanu/learn-regex). So, lots of examples and descriptions are excerpted from repo.
This repository contains a playground project that builds with Xcode 9 and Swift 4.
### Content
* How to use RegEx with Swift [#](https://github.com/ogulcan/SwiftRegEx/blob/master/SwiftRegEx.playground/Contents.swift#L23)
* A RegEx wrapper class to handle crowd[#](https://github.com/ogulcan/SwiftRegEx/blob/master/SwiftRegEx.playground/Contents.swift#L44)
* Meta Characters with examples [#](https://github.com/ogulcan/SwiftRegEx/blob/master/SwiftRegEx.playground/Contents.swift#L127)
* Quantifiers with examples [#](https://github.com/ogulcan/SwiftRegEx/blob/master/SwiftRegEx.playground/Contents.swift#L232)
* Shorthand sets [#](https://github.com/ogulcan/SwiftRegEx/blob/master/SwiftRegEx.playground/Contents.swift#L330)
* Flags [#](https://github.com/ogulcan/SwiftRegEx/blob/master/SwiftRegEx.playground/Contents.swift#L346)
* And some common examples like email, html tag etc. [#](https://github.com/ogulcan/SwiftRegEx/blob/master/SwiftRegEx.playground/Contents.swift#L379)### Useful Links
* [Easy RegEx](https://github.com/zeeshanu/learn-regex)
* [RegEx Cheat Sheet](https://www.cheatography.com/davechild/cheat-sheets/regular-expressions/pdf_bw/)
* [Enter the string that you want to use a regular expression on](https://txt2re.com/)
* [My favourite online RegEx tester](https://regex101.com/)#### To-do
- [ ] Better wrapper class, maybe an extension for String
- [ ] More common examples