Add an alternate regex delimiter (cf. leaning toothpicks) #114708
Unanswered
mike-clark-8192
asked this question in
Code Search and Navigation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
General
Body
GitHub code search uses the traditional
/
character to indicate a regex search (/regex/
). One of the problems with/
is leaning toothpick syndrome. I propose GitHub introduce an additional, alternate, delimiter. To that end, I reviewed all ASCII punctuation characters in a number of feature dimensions, scored them, and sorted them by score.If anyone has any questions, feel free to ask! Here's the data:
Footnotes
"Search" as a general, widely implemented concept ↩
JSON, YAML, INI, TOML, etc. ↩
✔=1.0 ◕=0.75 ◑=0.5 ◔=0.25 ✗=0.0 ↩
"approximate", ≈ ≲ ≅ etc. ↩ ↩2
common punctuation ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13 ↩14 ↩15 ↩16 ↩17 ↩18 ↩19 ↩20 ↩21 ↩22 ↩23 ↩24 ↩25 ↩26
metacharacter ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8
Boolean logic ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13 ↩14 ↩15 ↩16 ↩17 ↩18
arithmetic ↩ ↩2 ↩3 ↩4
commonly used at start/end of regex ↩ ↩2
$var is just so common ↩
markdown ↩ ↩2 ↩3 ↩4
escaping ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8
quoting ↩ ↩2 ↩3 ↩4 ↩5
precedent as alternate regex delimiter with vim, perl, sed, etc., but is also a regex metachar ↩
YAML, HTML ↩
in use ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9
separator ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13
#tag #topic, etc. ↩ ↩2
comment character ↩ ↩2 ↩3
aka "required" search term ↩ ↩2
@username ↩
pointers, splatting ↩
grouping ↩ ↩2 ↩3 ↩4 ↩5
pseudo-letter ↩ ↩2 ↩3 ↩4 ↩5
URLs, Paths ↩ ↩2 ↩3
Beta Was this translation helpful? Give feedback.
All reactions