My regex here seems to work some of the time when testing this small block of code. It seems to always fail in my larger code though...
Code: Select all
MyEntry := "They uses the following. They reads often."
MyEntry := RegExReplace(MyEntry, "([Tt]hey\s)(.*)(s)", "$1$2")
MsgBox post fix: %MyEntry%
EDIT: Note also, that this one DOES work
Code: Select all
MsgBox % RegExReplace("They uses the book", "([Tt]hey\s)(.*)(s)", "$1$2")
EDIT2: Nope... If I swap the haystack strings, then the error follows the longer string... So I guess my regex likes the shorter one, but not the longer one.