That isn't how the Kleene star works.
A* is "the set of all strings over the alphabet {A}, including the empty string ε."
"QQQQ" is not a string over the alphabet {A} because it contains the symbol 'Q', which is not in {A}.
A* is "the set of all strings over the alphabet {A}, including the empty string ε."
"QQQQ" is not a string over the alphabet {A} because it contains the symbol 'Q', which is not in {A}.
/A*/.test('QQQQ');
> true
Showing that yes, /A/ does match 'QQQQ'Just because these tools use regex this way doesn't mean that's how regex really works.
/A*/.exec('QQQQ')
[""]
When computer scientists discuss what a regular express does and does not "match", they are saying that strings which are "matched" by a regex are those strings which are members of the regular language defined by the regex. QQQQ is not a string in the language defined by /A* /, so /A* / does not match QQQQ.If we look at things your way, we would have to say that the regex /A/ matches "AQQQQ". It does not. It matches "A".