Am confused by all of what seem to be escape characters and the seemingly random use of more than one of them "/" and "\"; if there was only one escape character, it might make more sense.
Worse, this funnybusiness of having undisclosed functions for some random character "." and then using a different character as the escape character is strange to say the least.
I say undisclosed because i have not seen mention of which characters are "special" and what they exactly stand for.
One could make "." very strict, in that the code parser would ignore everything at that point (the period) and all afterwards on that line
One could use a different character at the end of a physical line to indicate that there is more code on the next line, implying code rattles on until there is blankspace at the end of a line.
Of the three corrected forms, i prefer the first over the second because it "looks" nicer.
Your showing my ".png" string argument being type-converted to a regular expression is useful.
But how in the heck does a newbie/dummy know that a given expression like ".png" is not what is considered a "regular expression"?
I do not see any tutorials that cover what may be considered fundamentals.
To heck with M$, just because they act like a big bully does not mean one can be dictated by their whims.
That code can be the full new parser doing everything you want - and no more.
Blow their socks off!