A Regex to match a SHA1

后端 未结 6 2000
旧巷少年郎
旧巷少年郎 2020-12-02 18:37

I\'m trying to match SHA1\'s in generic text with a regular expression.

Ideally I want to avoid matching words.

It\'s safe to say that full SHA1\'s have a d

6条回答
  •  情话喂你
    2020-12-02 19:05

    For this type of hash : 43:A4:02:B7:B6:1D:89:86:C5:CE:AD:52:96:D9:2E:7B:64:98:45:6A :

    /^[0-9A-F]{2}(:[0-9A-F]{2}){19}$/
    

提交回复
热议问题