Using only the end of a file name for fiel relations

Started by Damit, March 21, 2025, 02:52:25 AM

Previous topic - Next topic

Damit

In this topic: Using only a part of the Master file name, the procedure to only include a certain amount of the initial portion of the file name in order to match. I was wondering if there is a reverse of  :n
Something that allows one to only use the end of the file name to match. Something like  :-n

I have discovered that many versions of the file naming system I want to use for my scans are prone to having the initial portion of the file name change, as I want to begin the file names with the date, along with other information that, while pretty stable, may change.  As such, I thought I would create unique numbers I would place at the end of all my scans and use that for relations. I figure they would also be more "secure" from anything that may lead lost relations by using this method. I tried using ^{File.Name|right:5}.*\.jpg$, but that did not work. 

Mario

The trick is usually to find the regular expression for the job.
More complex file names require more complex regular expressions.

Start with googling perl regexp part of string and then make some tests with the RegExp Tester app included in IMatch.

Damit

Thanks. Oh the joys of the regular expression rabbit hole!  Been down it many times but nothing seems to stick in my memory and I always have to relearn it.