How do I escape characters in GitHub code search?

前端 未结 3 1183
南方客
南方客 2021-02-04 23:12

I\'m trying to use GitHub\'s code search to search for some lines of code containing characters like =, +, etc.

I understand from https://help.

3条回答
  •  醉话见心
    2021-02-04 23:23

    You will need to do this locally. Here are some options, from https://stackoverflow.com/a/38288679/362202:

    • clone your company's github source website
    • do locally a git grep, which supports basic regexp or extended POSIX regexp (git grep -E)
    • or a pickaxe search (git log --all -S...
    • or git rev-list --all|grep xxx which also allows for regexp

    These strategies would not work for github-wide searches, which is a shame.

提交回复
热议问题