I\'m trying to use regexp_extract on hive.
I have data which is varying in nature, such as:
a2=new something a1=asdasdsad;a2=old something;a3=asadasdsadsa
(?<=a2=)=?([^;\n]*)
I think RegEx101 is pretty helpful for you to understand the logic. I tried the above expression and it seem to work to extract the content for a2 with or without ;.
a2
;