Skip to content

Support searching for numeric literals with digit separators in GitHub Code Search #129896

Discussion options

You must be logged in to vote

Thanks for the suggestion. I recommend using a regular expression for this use case.

For example, to search for variations of 1,000,000 you could use: /1[_,0]{6,}/. This isn't exactly what you want: it will match 100_000 since it has 6 characters after the 1 just like 1000000 does. However, it will narrow the search space considerably. If there's a format regularly used in your codebase, you could provide a stricter regular expression.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by look
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement An idea, feature request, or improvement to a GitHub feature Code Search and Navigation Search, navigate, and understand code on GitHub
2 participants