Moved regex into a new class