Skip to content

IoLanguage/Regex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Regex

The Regex addon adds support for Perl regular expressions using the PCRE library by Philip Hazel.

Example 1

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> "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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published