Why does R (at least with tidyverse/stringr) recognize the following regexp: *\.(png|jpg|jpeg)? (in R due to character escaping one actually needs to write the string "*\\.(png|jpg|jpeg)")
I think the correct regexp should be .*\.(png|jpg|jpeg) (writing in R ".*\\.(png|jpg|jpeg)"))
When i introduce the first expression on e.g. regex101.com, it says that is is an illegal regexp. But R seems to parse it without issues.
Why?
Is the expression *\.(png|jpg|jpeg) a valid regular expression? If so, why does regex101 complain? If not, why does R accept it?