I’m writing a custom_data section and for the fn: section I need to specify the pattern in a case-insensitive way. I could get around this by copying files around, but I’d rather not. Is there a way to control the options on the pattern-matching that is used behind the scenes?
I tried setting chopt -s nocaseglob but that doesn’t seem to help.
Thanks for the swift response, but I’m not sure it fully resolves my problem.
My pattern is actually provided to me using !ENV. Specifically I’m given the name of a gene and am looking for files with that gene in a particular location in the filename. The problem is that the gene name is provided by the user and the filename comes from a case-insensitive match with a resource. I could process the <gene_name> and create the pattern “[gG][eE][nN][eE]_[nN][aA][mM][eE]” from it and use that in fn_re but I was hoping for a cleaner solution, something like "oh sure, just add case_sensitive_pattern_match: true under the fn_re element…
I understand form your response that this isn’t possible, but perhaps you’d consider it as a future feature…
Ok, I think I finally figured out a way to do it (after trying several approaches!). You can use a regular expression instead of a glob, then pass a case-insensitive modifier within the regex: (?i)
So, for your example above, I think that this should work: