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.