Author Topic: GREP in Find Command  (Read 6664 times)

Offline BobBalestri

  • Newcomer
  • *
  • Posts: 30
    • View Profile
GREP in Find Command
« on: August 16, 2019, 07:37:17 PM »
I'm trying to use grep to find keyword list such as the string    "8/15/2019, more"
with or without enclosing quote marks but nothing seems to get found so it is highly probale that I don't know what I'm doing.
So, can you tell me what ti do please
Bob

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25627
    • View Profile
    • Camera Bits, Inc.
Re: GREP in Find Command
« Reply #1 on: August 16, 2019, 09:10:57 PM »
Bob,

I'm trying to use grep to find keyword list such as the string    "8/15/2019, more"
with or without enclosing quote marks but nothing seems to get found so it is highly probale that I don't know what I'm doing.

Are you searching for that exact string?  If so, you don't need grep.  But if you're wanting to find any date in the keywords field then you'd use the grep feature like so:

[0-9]+\/[0-9]+\/[0-9]{4}

That will find dates that look like 1/1/2000 or 01/1/2000 or 01/01/2000.  The reason for the backslashes is because the forward slash is a special character for grep.

If you're looking to educate yourself on the power of regular expressions, this site is great:

https://regexr.com/

HTH,

-Kirk

Offline BobBalestri

  • Newcomer
  • *
  • Posts: 30
    • View Profile
Re: GREP in Find Command
« Reply #2 on: August 17, 2019, 08:44:41 AM »
I hate to be dense but here goes:

Getting rid of the date stuff.

If I search for

Bayberry Road, Maryland

Find doesn't find it

If I search for

Bayberry Road

Find finds it

If I search for

Bayberry Road,
Find doesn't find it

I hoped the presence of the comma would be overcome by using grep but that isn't so.
And thanks for the grep reference

Oh, can I get a twofer...

When I email from PM, I use to get an address list from my contacts but that doesn't happen anylonger, did you guys take that out or this another thing I'm being dense about?

Bob

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25627
    • View Profile
    • Camera Bits, Inc.
Re: GREP in Find Command
« Reply #3 on: August 17, 2019, 08:46:27 AM »
Bob,

I hate to be dense but here goes:

Getting rid of the date stuff.

If I search for

Bayberry Road, Maryland

Find doesn't find it

If I search for

Bayberry Road

Find finds it

If I search for

Bayberry Road,
Find doesn't find it

I hoped the presence of the comma would be overcome by using grep but that isn't so.

Could you please post screenshots of your Find and the Find and Replace panels?  Use the 'Attachments and other options' link when you're composing your reply to this message and there you'll be able to upload your JPEG format screenshot.

Thanks,

-Kirk

Offline BobBalestri

  • Newcomer
  • *
  • Posts: 30
    • View Profile
Re: GREP in Find Command
« Reply #4 on: August 17, 2019, 08:50:51 AM »
Hope this works

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25627
    • View Profile
    • Camera Bits, Inc.
Re: GREP in Find Command
« Reply #5 on: August 17, 2019, 08:59:16 AM »
Bob,

It did.  Try setting the "Treat repeating fields as a single string" checkbox.  I think it will solve your problem.

-Kirk

Offline BobBalestri

  • Newcomer
  • *
  • Posts: 30
    • View Profile
Re: GREP in Find Command
« Reply #6 on: August 22, 2019, 01:38:38 PM »
All works fine thank you.  Now it seems to me that:

Treat repeating fields as a single string

should be the default since it is the string in the search box that I want to find but I really don't know the consequences of such an action

No reply needed here, just a thought

Thanks Again
Bob

Offline mike mcsharry

  • Newcomer
  • *
  • Posts: 3
    • View Profile
Re: GREP in Find Command
« Reply #7 on: November 04, 2026, 08:20:14 AM »
I know this is an old topic but it's the closest answer to something I'm really struggling with.
When an image has more than one number in the keywords field, the information is seperated by a comma and a space.
For example I tag an image with 24,72 in the keywords field - it is recorded as 24, 72 (also any subsequent entriesa re treated the same).
Is there any way to find images with a comma in the keywords field and/or is there any way to replace comma with another charcter and / or replace comma space with another character?
Many thanks
Mike

Offline ahoward

  • Camera Bits Staff
  • Uber Member
  • *****
  • Posts: 1411
    • View Profile
Re: GREP in Find Command
« Reply #8 on: November 04, 2026, 09:08:26 AM »
I know this is an old topic but it's the closest answer to something I'm really struggling with

You're welcome to just start a new topic. It helps for searchability for people who have a similar question in the future.

When using 'Find' there is a checkbox that says "Treat repeating fields as a single string". Typically, commas in the Keywords field separate the text in the field into individual items (that don't include their trailing comma). When you check that box, it just treats the entire field as one string. So if you check that box and use the 'Find' tool to just search for the ',' character, it should find any item that has a comma.

Offline mike mcsharry

  • Newcomer
  • *
  • Posts: 3
    • View Profile
Re: GREP in Find Command
« Reply #9 on: November 04, 2026, 09:27:07 AM »
Thank you - that's got it.
I ticked the GREP box and the 'treat repeating fields as a single string'