Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Regex: Char-class equivalent for [^]

by LanX (Canon)
on Jan 14, 2013 at 13:49 UTC ( #1013215=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    >>> "a <\n \n> z".match('<[^]*>')
    ["<\n \n>"]
    
  2. or download this
      DB<118> "a <\n \n> z" =~ /<(?:.|\n)*>/  ; $ &
     => "<\n \n>"
    
  3. or download this
      DB<146> "a <\n \n> z" =~ /<(?s:.)*>/;$ &
     => "<\n \n>"
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2014-07-26 14:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (177 votes), past polls