sql - what does '^\d+\D+$' mean in regexp
oracle, regexp-like, sql
Solution
^ beginning of string
\d single digit
+ one or more occurrences of preceding
\D nondigit character
+ one or more occurrences
$ end of string
So, it means one or more digits followed by one or more nondigits, and that should be the whole string, not a substring.
Problem
I came through an expression - ``` select * from table where regexp_like(field, '^\d+\D+$'); ``` I'm sure of what the expression does, but please can someone explain what `'^\d+\D+$'` refers to exactly? Thanks.