# next var (regex)

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

If this is a global pattern (using the "g" flag), then after a call to Find() this var contains the index where next Find() should begin.

Replace() on a non-global pattern will also store the index of the next place to begin a search here. The position to search will be based on the replaced text, which is stored in the text var.

### See also
- [regex datum](https://ref.dm-lang.org/regex/index.md)
- [Find proc (regex)](https://ref.dm-lang.org/regex/proc/Find.md)
- [Replace proc (regex)](https://ref.dm-lang.org/regex/proc/Replace.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)
