Updated regex that recognizes valid path IDs