RegexForRange

This is simple gem to return all possible regex for range of number

Example -> Regex for range 1 to 100 is [1-9]|[1-9][0-9]|100

Installation

Add this line to your application's Gemfile:

gem 'regex_for_range'

And then execute:

$ bundle

Or install it yourself as:

$ gem install regex_for_range

Usage

regex = RegexForRange.get_regex_for_range(start, end)

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/dhwanitgupta/regex_for_range.

License

The gem is available as open source under the terms of the MIT License.