Hi- I'm trying to work with regexes in PHP on my school's news site (running WordPress). The idea is, whenever someone saves a post, all instances of "Regis" (without 'Jesuit' at the end) are replaced with "Regis Jesuit." (I go to Regis Jesuit High School, and they're picky about their branding). Overall this works fine with the following case-insensitive regex:
/regis(?! jesuit)/i
How would I modify this regex so it doesn't match if it finds the string "Regis" or 'Regis' (in single or double quotes)? (or even "I go to Regis High School" quoted as well)? The idea here is to change it where necessary, but to keep it the same in direct quotes in people's stories so we don't change people's quotes.
Thanks! Morgan