I have a string where I want to extract the key information from:
gbk_kings_common_20171201_20180131_66000.0k_2017-12-01_TO_2018-01-31_id12_1277904128.csv
Namely, I would like to find the following:
- File identifier, e.g.
gbk_kings_common_20171201_20180131 - Size, e.g.
330.0k - Date, e.g.
2017-12-01_TO_2018-02-31 - Type of id, e.g.
id12_12771231518
But I'm having a difficulty compiling the regex since the file identifier can always change in the length, although the rest of the information is pretty fixed when delimited by commas.
_both inside the identifier and between different parts of the string makes it much more difficult.