Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Parse::RandGen::Regexp

by paulski (Beadle)
on Aug 06, 2005 at 15:38 UTC ( #481499=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    my $r = Parse::RandGen::Regexp->new($regexp);
    my $string = $r->pick(match=>1, captures=>{}); 
    print("\$string: $string\n");
    
  2. or download this
    Unrecognized escape \s passed through at ./regexp2.pl line 6.
    %Error:  Parse::RandGen::Regexp has an element that is not a Regexp re
    +ference (ref="")! at /usr/lib/perl5/site_perl/5.8.6/Parse/RandGen/Reg
    +exp.pm line 36
        Parse::RandGen::Regexp::_newDerived('Parse::RandGen::Regexp=HASH(0
    +x9dcdd88)', 'HASH(0x9e5f138)') called at /usr/lib/perl5/site_perl/5.8
    +.6/Parse/RandGen/Condition.pm line 81
        Parse::RandGen::Condition::new('Parse::RandGen::Regexp', '/^STORs[
    +^\x{a}]{100}/smi') called at ./regexp2.pl line 7
    
  3. or download this
    "/^STOR\s[^\n]{100}/smi";
    
  4. or download this
    qr/^STOR\s[^\n]{100}/smi
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://481499]
Approved by fauria
Front-paged by fauria
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2021-06-21 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (98 votes). Check out past polls.

    Notices?