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;