Get the id with regex for redirect