I need to capture 3 groups separately. For ex:
s3://some/path/TIMESTAMP/part-1234.parquet
|----- g1 ---------|------ g2 ------|--------- g3 ---------|
where g3 is the file name, g2 is the TIMESTAMP and g1 is anything that precedes the timestamp
I've come up with capturing 2 groups using scala:
val pattern = "(.*?)(part.*.parquet)$".r
val pattern(fileBasePath, filename) = row.file_path
what I'm looking for is something like this:
val pattern(fileBasePath, timestamp, filename) = row.file_path
What would the pattern look like for the above?