Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

creating qr from existing regex

by Bobert1234 (Novice)
on Feb 08, 2018 at 18:06 UTC ( [id://1208734]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    Use qr/.../ to use a regular expression in a query .....
    my $cursor = $collection->query({"name" => qr/[Jj]oh?n/});
    
  2. or download this
    {"name" => '/.*uba$/i'}
    
  3. or download this
    {"name" => 'qr/.*uba$/i'}
    
  4. or download this
    if(index($_[0],"qr/") >= 0){ 
                    $_[0] =~s/qr(.*?)(i?)$/$1/s;
                    print $fh Dumper($_[0]);
    ...
                    $_[0] =$re;
                    print $fh Dumper($_[0]);
                }
    
  5. or download this
    $VAR1 = '/.*uba$/';
    $VAR1 = undef;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-19 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found