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

Re^6: regexp question

by Not_a_Number (Parson)
on Oct 28, 2011 at 19:08 UTC ( #934483=note: print w/replies, xml ) Need Help??

in reply to Re^5: regexp question
in thread regexp question

I think we have a problem of misnegation here.

You said:

A dot already matches everything but a single character.

On the other hand, in several places, perldoc says stuff like 'a dot matches any character'.

(BTW, I've deliberately avoided any mention of the newline character, as it's not relevant to this discussion.)

So how do you defend your statement 'A dot (..) matches everything but a single character' in the face of the evidence?

Replies are listed 'Best First'.
Re^7: regexp question
by JavaFan (Canon) on Oct 28, 2011 at 19:25 UTC
    my $count = 0; for my $c (0x00 .. 0xFF) { my $_ = chr $c; $count++ unless /./; } say $count;
    Feel free to adapt the range to the full Unicode set.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://934483]
zentara...oO 1 more reason I prefer Perl to Python is I can't believe how long Python takes to compile, and you can't disable the myriad of tests
[LanX]: so that's where you've been the last two years? Compiling Python?
[zentara]: LanX no! I was learning why Krishna made me into a unicorn. :-)
[LanX]: The old chromosone question ... Why Y???

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2017-03-30 16:49 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (361 votes). Check out past polls.