What's the equivalent of REGEX_EXTRACT_ALL in Hive? I'm trying to get all matched occurrences of a regular expression in Hive or Redshift.
Asked
Active
Viewed 1,719 times
0
-
Not sure, but this might be pertinent https://stackoverflow.com/questions/8497090/hive-regexp-extract-weirdness/8497735#8497735 – Jul 14 '17 at 00:45
-
Supply a data sample including required results – David דודו Markovitz Jul 14 '17 at 15:04
1 Answers
-2
Have a look at REGEXP_SUBSTR
. Doesn't have to the ability to return a specific capture group but you should be able to accomplish most of the same things using look ahead and look behind patterns. http://docs.aws.amazon.com/redshift/latest/dg/REGEXP_SUBSTR.html

Joe Harris
- 13,671
- 4
- 47
- 54
-
-
-
-
LOL did you delete your first comment. Actually I see 4 mentions if Hive before one casual mention of Redshift at the very end (not even in the title-but I’ll edit it now) – Dylan_Larkin Oct 17 '17 at 13:39
-
You should provide an example of how to return all regex matches. REGEX_EXTRACT will do the same thing in Hive but merely mentioning it won’t get him anywhere. – Dylan_Larkin Oct 17 '17 at 13:47