Author Topic: Find and Replace IPTC / delete after and before specified string  (Read 5383 times)

Offline jfe1978

  • Newcomer
  • *
  • Posts: 4
    • View Profile
Find and Replace IPTC / delete after and before specified string
« on: February 06, 2013, 05:31:50 AM »
Hi,

I use the find and replace function very often. One thing I can't accomplish is to delete everything after or before a specified string.

For example the caption is as follows:

Text to be erased
Photo by Jeff Friedel
Text to be erased


Let's say "Photo by Jeff Friedel" is the permanent part of my caption and I would like to delete everything after or before this string.

The last thread concerning a similar issue dated back to 2008 so I openend up this new one.

Thanks

Flo

PM Version 4.6.8 on Mac OS 10.6.8
« Last Edit: February 06, 2013, 05:53:13 AM by jfe1978 »

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Find and Replace IPTC / delete after and before specified string
« Reply #1 on: February 06, 2013, 06:31:44 AM »
I use the find and replace function very often. One thing I can't accomplish is to delete everything after or before a specified string.

For example the caption is as follows:

Text to be erased
Photo by Jeff Friedel
Text to be erased


Let's say "Photo by Jeff Friedel" is the permanent part of my caption and I would like to delete everything after or before this string.

On PM 5 you can search and replace with nothing.  You would have to do two operations to trim out the first text and the second text.

-Kirk

Offline jfe1978

  • Newcomer
  • *
  • Posts: 4
    • View Profile
Re: Find and Replace IPTC / delete after and before specified string
« Reply #2 on: February 06, 2013, 08:03:25 AM »
Hi Kirk,

thanks. This is what I always do with 4.6.8, too.

But that was not my point.

Let's say we have 300 pictures browsed in a contact sheet. They all have a different caption after the "Photo by Jeff Friedel" string. The idea is to tell PM to delete everything - and this could be any text - after "Photo by Jeff Friedel". Since the text is different in each picture I cannot search and replace with nothing.

Does the search and replace function support wildcards like search: "Jeff Friedel*" and replace with "Jeff Friedel"? This could also solve my problem.

Thanks!


Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Find and Replace IPTC / delete after and before specified string
« Reply #3 on: February 06, 2013, 08:25:48 AM »
Let's say we have 300 pictures browsed in a contact sheet. They all have a different caption after the "Photo by Jeff Friedel" string. The idea is to tell PM to delete everything - and this could be any text - after "Photo by Jeff Friedel". Since the text is different in each picture I cannot search and replace with nothing.

Does the search and replace function support wildcards like search: "Jeff Friedel*" and replace with "Jeff Friedel"? This could also solve my problem.

No, pattern matching is not supported.

But since you only want to keep the "Photo by Jeff Friedel" string, why not just do a Find operation to find that string, followed by an application of the IPTC Stationery Pad setting only that field to "Photo by Jeff Friedel"?  Kind of clunky, but it should work.

-Kirk

-Kirk

Offline jfe1978

  • Newcomer
  • *
  • Posts: 4
    • View Profile
Re: Find and Replace IPTC / delete after and before specified string
« Reply #4 on: February 06, 2013, 08:53:12 AM »
Thanks but that doesn't work. No worries, I only thought that it might have been part of one of the upgrades since the issue was discussed here in 2008.

The support of wildcards would be highly appreciated!

Flo

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Find and Replace IPTC / delete after and before specified string
« Reply #5 on: February 06, 2013, 09:04:10 AM »
Flo,

Thanks but that doesn't work.

How is it that applying the IPTC Stationery Pad with the text you want in that field doesn't work?  Is the IPTC Stationery Pad not working at all for you?

-Kirk

Offline jfe1978

  • Newcomer
  • *
  • Posts: 4
    • View Profile
Re: Find and Replace IPTC / delete after and before specified string
« Reply #6 on: February 06, 2013, 09:50:06 AM »
Kirk,

because there is indeed text before "Photo by..." that should be preserved. I just didn't mention that because it would have made my question less clear.

Flo

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Find and Replace IPTC / delete after and before specified string
« Reply #7 on: February 06, 2013, 10:12:04 AM »
Flo,

because there is indeed text before "Photo by..." that should be preserved. I just didn't mention that because it would have made my question less clear.

Thanks.  I understand now.

-Kirk