RegEx functionality in its own class(was inner class before).