move regexp to class