Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: In search of an efficient query abstractor

by eye (Chaplain)
on Dec 07, 2008 at 18:50 UTC ( #728759=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $query =~ s/[\n\r\f]+/ /g;
    
  2. or download this
    $query =~ s/(["']).*?\1/S/g;
    
  3. or download this
    $query =~ s/"[^"]*"/S/g;
    $query =~ s/'[^']*'/S/g;
    
  4. or download this
    $query =~ s{
                 \b(in|values?)\s*\(\s*([NS])\s*,[^\)]*\)
               }
               {$1($2+)}gx;
    
  5. or download this
    $query =~ s{
                 \b(in|values?) *\( *([NS]) *,[^\)]*\)
               }
               {$1($2+)}gx;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://728759]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2021-06-18 19:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (90 votes). Check out past polls.

    Notices?