Update: I am using this engine to evaluate my tests
I have highlighted the matches:
regex A*
string: BB AA AA BAA
result: BB AA AA BAA (no match)
regex A*
string: AA AA BAA
result: AA AA BAA
regex A+
string: BB AA AA BAA
result: BB AA AA BAA
I am wondering why in the first example, no AA is matched. and why in the second example, only the first AA is matched?
It really seems like a bug on regexr site.. Using regexbuddy I do see it captures all AA sequences by placing A*.. – What’s more, if you test against BA* you’ll see it correctly captures the last part of the string (BAA) – So this leads me to believe the engine is bugged and simply doesn’t work with a single char + * token.
EDIT: if you watch closely, you’ll notice that with the “global” flag on (so to match all sequences), regxr makes the
A*sequence red: indicating it can’t proces it correctly. (It probably wants to match an infinite times a 0-length string).