Moved regex down to where it belong