pig tutorial - apache pig tutorial - Pig - String extraction using regex ? - pig latin - apache pig - pig hadoop


  • Performs regular expression matching and extracts all matched groups.


REGEX_EXTRACT_ALL (string, regex)


string The string in which to perform the match.
regex The regular expression.


  • Use the REGEX_EXTRACT_ALL function to perform regular expression matching and to extract all matched groups. The function uses Java regular expression form.
  • The function returns a tuple where each field represents a matched expression. If there is no match, an empty tuple is returned.


  • This example will return the tuple (,8020).
REGEX_EXTRACT_ALL('', '(.*)\:(.*)');

Related Searches to Pig - String extraction using regex