Regular expression constraints imply String type