I tried some regex matching in Python. For example:
s = "aaabbb123123"
print(re.search("[ab]*", s))
output : <re.Match object; span=(0, 6), match='aaabbb'> --> Ok, it's good.
s = "aaabbb123123"
print(re.search("[.]*", s))
output : <re.Match object; span=(0, 0), match=''> --> why not "aaabbb123123"?
s = "aaabbb123123"
print(re.search("[123]*", s))
output : <re.Match object; span=(0, 0), match=''> --> why not "123123"?
My question is why the pattern "[anything]*" doesn't work if the matched string is not at the starting position of the target string.