Try it out on these example inputs:

back to RegexSwap.

MD5 hash

Regular expression:

^([a-f0-9]{32})$

Categories:

Popularity:

You need to be logged in to cast votes on regexes.

Good
2
Bad
0

Author description and comments (2)

Topic by
kasper

2009-01-22
22:52

Description

Matches a 32-digit MD5 hash. Useful for validating hashed database-columns.

Comment by
monkeytooth


That will validate just about any string. If you want specifically an MD5 hash then it should be a-f 0-9 and 32 char. So with the example here I could drop a invalid hash string and still be verified as a valid one.

Comment by
kasper


You're right! Guess this was just a case of very lazy reproduction. But I corrected it now! Thanks.

You need to be logged in to participate

In order to post your own comments on this regex, you need to be logged in.

Username:

Log in by clicking the login link at the top of the screen