Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^4: regexp question

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

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

A dot already matches everything but a single character.

Err... are you sure you meant to say that?

Replies are listed 'Best First'.
Re^5: regexp question
by JavaFan (Canon) on Oct 28, 2011 at 18:28 UTC
    Yes. Care to point out another character beside a newline that isn't matched by a dot?

      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?

        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://934462]
Discipulus the pope is the last good politic here around..sigh
[Discipulus]: erix the right order of books is: The Three Musketeers, Twenty Years After, The Count of Moret; The Red Sphinx (not in the cycle but a must read!), The Vicomte de Bragelonne

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2017-05-24 07:09 GMT
Find Nodes?
    Voting Booth?