Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: question about the star(*) quantifier

by chargrill (Parson)
on Dec 21, 2006 at 17:52 UTC ( [id://591147]=note: print w/replies, xml ) Need Help??


in reply to Re^2: question about the star(*) quantifier
in thread question about the star(*) quantifier

It's already been said above, but I'll restate it:

\d* means explicitly: "Match 0 or more digits"

That matches any sequence of characters that is "0 or more digits".

At the very beginning of your string (leftmost portion), a string matches that - an empty string '' right before "I fear that...".

Update: I guess samtregar beat me to it, but our message is the same :)



--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)

Replies are listed 'Best First'.
Re^4: question about the star(*) quantifier
by snowsky (Initiate) on Dec 21, 2006 at 17:59 UTC

    I see now.

    Thanks for all your answers and good explainations.

    Thanks again.

    Cindy

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-23 19:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found