Functions that manipulate Regex strings