I am trying to find the number of frequency of a character in a string in Presto.
like 129.11.20.0 and I wan to find number of dot . in this string.
just wondering if any function available
I was looking for the same in AWS athena, which is a managed presto service. It doesn't support regexp_count, so I used the following expression instead:
SELECT CARDINALITY(REGEXP_EXTRACT_ALL('1.1.1.1', '\.'))
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With