Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Explanation requested regarding negation of characters classes in perlretut

by BrowserUk (Patriarch)
on May 29, 2004 at 01:16 UTC ( [id://357394]=note: print w/replies, xml ) Need Help??


in reply to Explanation requested regarding negation of characters classes in perlretut

Maybe a picture will help. Try running this on a screen that is at least 108 chars wide.

#! perl -slw use strict; for my $re ( qw[ .* \d \D [^\d] [^\D] \w \W [^\w] [^\W] [\d\w] [^\d\w] [\D\W] [^\D\W] ] ) { printf "%8s:'%s'\n\n", $re, join '', map{ /$re/ ? $_ : ' ' } map{ chr } 32 .. 126; };;

Normally I'd post the output, but the OSU PM wrap feature doesn't like it.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://357394]
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: (5)
As of 2024-03-29 13:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found