Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Unrecognized escape \Q passed through in regex

by ikegami (Patriarch)
on Jan 26, 2006 at 18:52 UTC ( [id://525815]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print($regexp)  Expect        Gives
    --------------  ------------  ----------
    ...
    \Q**LOL**       \*\*LOL\*\*   \Q**LOL**
    \\Quit\\Exit    \\Quit\\Exit  \Quit\Exit
    \Qfoo\\E        foo\\\\E      foo\\
    
  2. or download this
    my $in_quote = 0;
    
    ...
          }
       }
    /eg;
    
  3. or download this
    $regexp =~ s/
       \G
    ...
    /
       $1 . (defined($2) ? quotemeta($2) : '')
    /xge;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-04-25 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found