# text var (regex)

Source: https://ref.dm-lang.org/regex/var/text
Added in BYOND 510.

If this is a global pattern (using the "g" flag), then after a call to Find() this var contains the text that was searched. If that same text is searched again, the next var is the default starting position.

Replace() on a non-global pattern will store the text *after* replacement here.

### See also
- [regex datum](https://ref.dm-lang.org/regex/index.md)
- [Find proc (regex)](https://ref.dm-lang.org/regex/proc/Find.md)
- [index var (regex)](https://ref.dm-lang.org/regex/var/index_page.md)
- [match var (regex)](https://ref.dm-lang.org/regex/var/match.md)
- [next var (regex)](https://ref.dm-lang.org/regex/var/next.md)
