{"html_url": "https://github.com/simonw/datasette/issues/1439#issuecomment-1045069481", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1439", "id": 1045069481, "node_id": "IC_kwDOBm6k_c4-Sn6p", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-02-18T19:34:41Z", "updated_at": "2022-03-05T21:32:22Z", "author_association": "OWNER", "body": "I think I got format extraction working! https://regex101.com/r/A0bW1D/1\r\n\r\n ^/(?P[^/]+)/(?P(?:[^\\/\\-\\.]*|(?:\\-/)*|(?:\\-\\.)*|(?:\\-\\-)*)*?)(?:(?\\w+))?$\r\n\r\nI had to make that crazy inner one even more complicated to stop it from capturing `.` that was not part of `-.`.\r\n\r\n (?:[^\\/\\-\\.]*|(?:\\-/)*|(?:\\-\\.)*|(?:\\-\\-)*)*\r\n\r\nVisualized:\r\n\r\n\"image\"\r\n\r\nSo now I have a regex which can extract out the dot-encoded table name AND spot if there is an optional `.format` at the end:\r\n\r\n\"image\"\r\n\r\nIf I end up using this in Datasette it's going to need VERY comprehensive unit tests and inline documentation.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 973139047, "label": "Rethink how .ext formats (v.s. ?_format=) works before 1.0"}, "performed_via_github_app": null}