An open API service indexing awesome lists of open source software.

https://github.com/udzura/mruby-posix-regexp

mruby's RegExp implementation using libc's regexp
https://github.com/udzura/mruby-posix-regexp

hacktoberfest hacktoberfest2021 mruby

Last synced: about 1 year ago
JSON representation

mruby's RegExp implementation using libc's regexp

Awesome Lists containing this project

README

          

# mruby-posix-regexp [![CI](https://github.com/udzura/mruby-posix-regexp/actions/workflows/ci.yml/badge.svg)](https://github.com/udzura/mruby-posix-regexp/actions/workflows/ci.yml)

Regexp class with libc regex (POSIX Regex) backend

## install by mrbgems

- add conf.gem line to `build_config.rb`

```ruby
MRuby::Build.new do |conf|

# ... (snip) ...

conf.gem github: 'udzura/mruby-posix-regexp'
end
```

## example

```ruby
b = "xxx".gsub /x/, "y"
#=> "yyy"

"foo bar buz".scan /\w+/
#=> ["foo", "bar", "buz"]
```

## License

under the MIT License:

- see LICENSE file

## Thanks

- Referred from [mruby-pure-regexp](https://github.com/WindProphet/mruby-pure-regexp) in many Ruby methods and basic test cases.