For the purpose of this book, we are using a console application to illustrate the use of regex. In reality, you would probably not have this logic mixed in between your production code, because this would result in code being rewritten. The best place to add something such as regex is in a helper class within an extension method.