Skip to content

fuegito/range_regexp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transform Ruby ranges to regexps

The solution to convert a Ruby Range to a Regexp

Install

In the system:

gem install range-regexp

or add the gem to the Gemfile:

gem 'range-regexp'

and then run bundle install.

Usage

converter = RangeRegexp::Converter.new(-9..9)
converter.convert # => /-[1-9]|\d/

About

Convert a Ruby range to a regexp.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%