Redshift regexp_substr
问题 I want to replicate this regex pattern to regexp_substr. I want to capture the second group. '(\?)(.*?)(&|$)' I have tried this regexp(my_url, '\\?.*?&|$') And some similar variations of the above, but I have been getting the errror: ERROR: XX000: Invalid preceding regular expression prior to repetition operator. The error occured while parsing the regular expression: '\?.*?>>>HERE>>>&|$'. 回答1: Since Amazon Redshift supports only POSIX regex, you need to use greedy quantifiers rather than