improved regex for id