---
layout: docs
title: regex
id: class.Facebook.HackCodegen.HackBuilderValues.regex
docid: class.Facebook.HackCodegen.HackBuilderValues.regex
permalink: /docs/reference/class.Facebook.HackCodegen.HackBuilderValues.regex/
---
# Facebook\\HackCodegen\\HackBuilderValues::regex()




Render a regex literal, e




``` Hack
public static function regex<T>(): IHackBuilderValueRenderer<\HH\Lib\Regex\Pattern<T>>;
```




g. ` re"/foo/" `.




## Returns




* ` IHackBuilderValueRenderer<\HH\Lib\Regex\Pattern<T>> `