I'm using DO 10.2.0.9.
I tested {file|escregexp|noext} to see if that did the trick for me as part of a regex, but I noticed that it doesn't seem to strip the extension, as
the help says it should on the page "Codes for passing filenames", regarding escregexp.
It doesn't even do it for a singleextension file, i.e "test.jpg" becomes "test.jpg", not "test".
The order doesn't seem to matter, only that "escregexp" is present.
After I couldn't get it to work, I tried using {dlgstring} to show what it actually contained, and below are the results.
With the file "test.part1.rar" selected
{file|noext} = "test"
{file|escwild|noext} = "test.part1"
{file|escregexp|noext} = "test.part1.rar".
As I see it, only one of those should be correct in all cases, although I'm not sure which, although if it should match the documentation then it should've returned "test" (or test.part1, test.part1)
in all cases.
Which direction does it actually parse the flags/parameters (left->right, right->left)?
What I originally was looking for was a way to select all parts of the current .rar file(s), without also selecting files with similar names.
However, .partX seems to be in the filename part (or not), so I'm a bit stumped.
The filename might contain brackets etc, so to use it in a regex I would need to escape them.
Say you have these files
test.part1.rar
test.part2.rar
test.part3.rar
test.xls
test1.part1.rar
test1.part2.rar
test1.xls
and test.part1.rar is selected, then I want all test.partX.rar selected, and nothing else.
If both test.part1.rar and test1.part1.rar is selected, then I would want it to select the parts of both.
If the {file|escregexp|noext} really worked and returned the base (without .partX), then I could've used something like:
SELECT REGEXP "{file|escregexp|noext}.part\d+.rar", or something similar.