Regex invalid syntax

That’s odd. Does it work if you hard-code it inside the shortcode?

Try double-escaping the parameter. It shouldn’t matter, but try it.

{{< getfile regex="(/\\\\*(?sU).*\\\\*/)|(//.*)" >}}