Registry / testing / randexp

randexp

JSON →
library0.1.7rbrubygemsunverified

Library for generating random strings from regular expressions.

gem install randexp
INSTALL
IMPORT
SIG · RANDEXP
R
randexp
testingrubyv0.1.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Randexp
require 'randexp'

Generate a random string matching a regex.

require 'randexp' regex = /[a-z]{5}\d{3}/ random_string = regex.randexp puts random_string # e.g., 'abcde123'
Debug
Known issues
gotchaMay generate strings that are not valid for complex regexes with lookaheads or backreferences.
fix
Test generated strings against the original regex to ensure validity.
affects: >= 0.1.0
Upgrade
Version history
0.1.7latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
randexp — gem install randexp · libregistry