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

Re: basic question: regular expression

by BrowserUk (Patriarch)
on Dec 01, 2016 at 08:28 UTC ( [id://1177021]=note: print w/replies, xml ) Need Help??


in reply to basic question: regular expression

Why do I get in case 1 and 5 no "a" at the end of the matching circuit ??.
  1. You asked for if /k?a?/: optionally 'k', optionally followed by 'a'.

    The optional 'k' was satisfied; everything after that was optional, so STOP here.

  2. You asked for if /k?a*/: Optionally 'k';, followed (or not) by zero or more 'a's.

    Found a 'k'; everything after is optional, so STOP here.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-03-28 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found