I am trying to match multiple values in a string using hive regxp, looking for an optimal solution.
I want to match "first" and "1.11" from the below
column name is col:
This string is the first string with two decimals 1.11 and 2.22 with a special char / and some more extra string.
table name is t:
query I was using:
select * from t where t.col regexp '(?=.*first)(?=.*1.11)'
Could you please help me.
Regex always gives me a go. Knowing if you have a typo, or are completely missing what works and what doesn't is always a big pain. Try working with something like this Regex Tester to get your regex string setup:
If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.