Reputation: 51
How can we use REGEX_EXTRACT_ALL command in PIG to extract all occurrences of data within square brackets ?
Apparently '\[(.*?)\]' doesn't work.
'\[(.*?)\]'
Upvotes: 1
Views: 159
Reputation: 67968
\\[(.*?)\\] should do it.
\\[(.*?)\\]
You need to escape [].
[]
Upvotes: 2