#!/usr/bin/perl -w use strict; use Parse::RandGen::Regexp; my $regexp = ; chomp $regexp; # get rid of the line termination. my $r = Parse::RandGen::Regexp->new(qr/$regexp/); my $string = $r->pick(match=>1, captures=>{}); print("\$string: $string\n"); __END__ (?smi)^STOR\s[^\n]{100}