Please don't use regexes.
Regexes should be seen more like a last resort than a good software engineering choice. They're a code smell. I have seen so many incorrect, slow regexes from people who don't know what they are doing that I have to recommend as a best practice that you don't use them unless you are going to study automata, read Friedl's book, the Dragon book, and study with Tibetan regex monks for years, and mentor everyone who has to maintain your code until you die.
i've thought of a case i used a regex the last time. and it was removing whitespace in some code file.