I am facing the same problem. pattern = '.RESPONDENT_[0-9]..csv.gz'; using above command I am getting 4 results but removing .* from the begning of pattern, I am getting 0 results. please help
RESPONDENT_0_0_0.csv.gz
RESPONDENT_1_0_0.csv.gz
PROJECT_SLICE_RESPONDENT_0_0_0.csv.gz
PROJECT_SLICE_RESPONDENT_1_0_0.csv.gz
CodePudding user response:
This will work for the regexp
RESPONDENT(_\d){1,3}\.csv\.gz
Just remember to escape the backslashes in the Snowflake literal. It will (probably) need to be:
'RESPONDENT(_\\d){1,3}\\.csv\\.gz'
CodePudding user response:
Try this out(supports 3 digits), i gave it a few tests here:
^.*_\d.*$