Regex for Checking for at Least One Digit

Tests whether a string contains at least one numeric digit anywhere.

Published October 11, 2026

Tests whether a string contains at least one numeric digit anywhere.

Key points

  • Often combined with uppercase/lowercase/symbol checks in password strength validation

Example

.*\d.*
More General articles