# Regex invalid syntax

**URL:** <https://discourse.gohugo.io/t/regex-invalid-syntax/5379>\
**Category:** support\
**Created:** [February 8, 2017, 7:13am UTC](https://discourse.gohugo.io/t/regex-invalid-syntax/5379 "2017-02-08T07:13:33Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![moorereason](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/moorereason/32/592_2.png) [@moorereason](https://discourse.gohugo.io/u/moorereason)\
**Post date:** [February 8, 2017, 11:02pm UTC](https://discourse.gohugo.io/t/regex-invalid-syntax/5379/4 "2017-02-08T23:02:08Z")

</div>

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.

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

```

---

_[View the full topic](https://discourse.gohugo.io/t/regex-invalid-syntax/5379)._
