Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/vinc/regexp_sample

A very limited `Regexp#sample` method
https://github.com/vinc/regexp_sample

Last synced: 14 days ago
JSON representation

A very limited `Regexp#sample` method

Awesome Lists containing this project

README

        

RegexpSample
============

A very limited `Regexp#sample` method.

Install
-------

$ gem install regexp_sample

Usage
-----

```ruby
require "regexp_sample"

using RegexpSample

/[a-z0-9]{5}/.sample #=> "nt3r6"
/app[0-9]{5}/.sample(2) #=> ["app94832", "app04535"]
```

Copyright
---------

Copyright (C) 2014 Vincent Ollivier. See LICENSE for details.