Regular Expressions 101

IsNumeric Test

Open Workspace
  • PCRE2 (PHP)
  • Match
1

Regular Expression

/
(?<IsNumeric>^[+-]?([1-9]*|[1-9]{1,3}(,\d{3})*|[0]*)(\.\d+)?)\b$
/
gm

Description

Tests for any value that can be converted to a T-SQL numeric type.

Submitted by Noel Cruz