Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

Regexp search match multiple values

Expert Contributor


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.

Thank you


Super Guru

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: