github
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/1860#issuecomment-1292390996 | https://api.github.com/repos/simonw/datasette/issues/1860 | 1292390996 | IC_kwDOBm6k_c5NCFJU | 562352 | 2022-10-26T17:43:41Z | 2022-10-26T17:43:41Z | NONE | I guess the issue is here: https://github.com/simonw/datasette/blob/9676b2deb07cff20247ba91dad3e84a4ab0b00d1/datasette/utils/__init__.py#L209 Here is a working regexp allowing it: ```diff - re.compile(r"^select\b"), + re.compile(r"^\s*(/\*.+?(?=\*/)\*/\s*)*select"), ``` `^\s*`: beginning by 0 or an infinite number of \s (spaces, tabs, newlines...) `(/\*.+?(?=\*/)\*/\s*)*`: 0 or an infinite number of chars beginning by `/*` and ending to the next occurrence of `*/` followed by 0 or an infinite number of \s You can play with the regexp here: https://regex101.com/r/aESXDL/3 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1424378012 | |
https://github.com/simonw/datasette/issues/1860#issuecomment-1293863145 | https://api.github.com/repos/simonw/datasette/issues/1860 | 1293863145 | IC_kwDOBm6k_c5NHsjp | 562352 | 2022-10-27T17:43:37Z | 2022-10-27T17:43:37Z | NONE | Sorry I forgot the `-- comments like that`. I'm afraid there is an issue in your regexp, see: https://regex101.com/r/pyubJf/1 I guess I can fix it. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1424378012 | |
https://github.com/simonw/datasette/issues/1860#issuecomment-1293912781 | https://api.github.com/repos/simonw/datasette/issues/1860 | 1293912781 | IC_kwDOBm6k_c5NH4rN | 562352 | 2022-10-27T18:31:15Z | 2022-10-27T18:31:15Z | NONE | Here is my suggestion: `^\s*((?:\-\-.*?\n\s*)|(?:/\*.*?(?=\*/)\*/\s*))*select\b` See the following test: https://regex101.com/r/Doeqqa/1 And here I played all your tests: https://regexr.com/713ir | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1424378012 |