https://github.com/iolanguage/regex
https://github.com/iolanguage/regex
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/iolanguage/regex
- Owner: IoLanguage
- License: bsd-3-clause
- Created: 2018-03-11T11:59:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-16T18:16:22.000Z (about 8 years ago)
- Last Synced: 2025-01-21T00:48:45.229Z (over 1 year ago)
- Language: C
- Size: 17.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Regex
The Regex addon adds support for Perl regular expressions
using the PCRE library by Philip Hazel.
### Example 1
```Io
Io> re := "is.*a" asRegex
Io> "This is a test. This is also a test." \
matchesOfRegex(" is[^.]*a") replaceAllWith(" is not a")
==> "This is not a test. This is not a test.
```
### Example 2
```Io
Io> "11aabb" matchesOfRegex("aa*")
==> list("a", "a")
Io> re := "(wom)(bat)" asRegex
Io> "wombats are cuddly" matchesOfRegex(re) replaceAllWith("$2$1!")
==> batwom!s are cuddly
```
# Installation
`pcre` should be installed and foundable in your system. Then:
```
eerie install https://github.com/IoLanguage/Regex.git
```