home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1045069481

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/issues/1439#issuecomment-1045069481 https://api.github.com/repos/simonw/datasette/issues/1439 1045069481 IC_kwDOBm6k_c4-Sn6p 9599 2022-02-18T19:34:41Z 2022-03-05T21:32:22Z OWNER

I think I got format extraction working! https://regex101.com/r/A0bW1D/1

^/(?P<database>[^/]+)/(?P<table>(?:[^\/\-\.]*|(?:\-/)*|(?:\-\.)*|(?:\-\-)*)*?)(?:(?<!\-)\.(?P<format>\w+))?$

I had to make that crazy inner one even more complicated to stop it from capturing . that was not part of -..

(?:[^\/\-\.]*|(?:\-/)*|(?:\-\.)*|(?:\-\-)*)*

Visualized:

So 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:

If I end up using this in Datasette it's going to need VERY comprehensive unit tests and inline documentation.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
973139047  
Powered by Datasette · Queries took 0.83ms · About: github-to-sqlite