Use the same regexp in the backend and the frontend