I need to create a new column based on the column col, butextracting everything between the third - and the forth -. Examples:
ABC-123-aaa-INEEDTHIS-2000-BBB-123-CCC
111-AAAAA-bb-INEEDTHIS-BB-435-A
How can I do this with Big Query?
I'm trying something like this:
SELECT REGEXP_EXTRACT(col, r'\w\w[^\d]\d\d') as newcol from mytable
I would like to understand too the regex behind this solution, if possible.