I'm looking to capture all percents that's less than 30% with max 4 decimal places in a document.
Here's a working javascript regex sample: https://regex101.com/r/iM3nX5/5
When I use this regex \b(?:[1-2]?[0-9]\.[0-9]{1,4})\b[^a-zA-Z\d<]{0,3}%? in Postgres, it doesn't work:
SELECT regexp_matches('11111
11111.
11111.1111
.11111
a111.1111
99
010
101
100
100.01
2.95%
19.5113%
5.32
0.0250
9.32
24.32
0.0023
30.20
29.23', '\b(?:[1-2]?[0-9]\.[0-9]{1,4})\b[^a-zA-Z\d<]{0,3}%?', 'g')
Any ideas on what I'm missing to make it work in Postgres?
Thanks in advance.
