Author Topic: Find and Replace Issue  (Read 3883 times)

Offline andmetoo

  • Newcomer
  • *
  • Posts: 3
    • View Profile
Find and Replace Issue
« on: September 28, 2009, 03:46:09 AM »
PhotoMechanic 4.6.1 running under Windows Vista

I am evaluating PhotoMechanic and like it very much.  One of the features that I want to use is the Search and Replace in IPTC tags, but I've run up against a problem.  There doesn't seen to be a "whole word only" option, so that if I want to replace "rin1" with "rin0001" that works, but it also replaces "rin1058" with "rin0001058", which I dont't want.  Is there a workaround for this, perhaps using regular expressions?  Thank you.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24767
    • View Profile
    • Camera Bits, Inc.
Re: Find and Replace Issue
« Reply #1 on: September 28, 2009, 06:48:05 AM »
PhotoMechanic 4.6.1 running under Windows Vista

I am evaluating PhotoMechanic and like it very much.  One of the features that I want to use is the Search and Replace in IPTC tags, but I've run up against a problem.  There doesn't seen to be a "whole word only" option, so that if I want to replace "rin1" with "rin0001" that works, but it also replaces "rin1058" with "rin0001058", which I dont't want.  Is there a workaround for this, perhaps using regular expressions?  Thank you.

You are correct: there is only sub-string matching and there is no support for regular expressions.  I have no workaround for you to make the Find and Replace panel do what you want.

Since it looks like you're sequencing a name, you could just redo the sequencing with the IPTC Stationery Pad, using the {seqn} variable.  If you'll tell me what your naming scheme looks like and what field you want to work in, I'll guide you through the process.  (It's pretty easy and very fast.)

-Kirk

Offline andmetoo

  • Newcomer
  • *
  • Posts: 3
    • View Profile
Re: Find and Replace Issue
« Reply #2 on: September 28, 2009, 07:55:10 AM »
Thanks for your reply Kirk,

I'm working exclusively in the keywords field where I have reference numbers ("rin" numbers) for people in the respective images.  When I began the system, I started with "rin1", "rin2" and so on, but now that the rin numbers have reached over the thousand mark I have problems with searching for individuals because "rin1" also matches "rin1234" etc.  What I should have done was to start with "rin0001", "rin0002" and so on (isn't hindsight wonderful?).  So, what I need to do is to add leading zeros to all rin numbers below 999 in about three thousand files and within subfolders.  Any help with that would be very welcome!
 

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24767
    • View Profile
    • Camera Bits, Inc.
Re: Find and Replace Issue
« Reply #3 on: September 28, 2009, 08:49:57 AM »
Thanks for your reply Kirk,

I'm working exclusively in the keywords field where I have reference numbers ("rin" numbers) for people in the respective images.  When I began the system, I started with "rin1", "rin2" and so on, but now that the rin numbers have reached over the thousand mark I have problems with searching for individuals because "rin1" also matches "rin1234" etc.  What I should have done was to start with "rin0001", "rin0002" and so on (isn't hindsight wonderful?).  So, what I need to do is to add leading zeros to all rin numbers below 999 in about three thousand files and within subfolders.  Any help with that would be very welcome!
 

I don't have any solution that wouldn't require some manual selection of files and processing them in groups.

-Kirk

Offline andmetoo

  • Newcomer
  • *
  • Posts: 3
    • View Profile
Re: Find and Replace Issue
« Reply #4 on: September 28, 2009, 10:14:27 AM »
I could do it folder by folder, but it would be quite laborious as the process would have to be repeated for each of the rin numbers in each of the folders.  Thanks anyway.