Why not use a regex here?