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

Offline BobBalestri

  • Newcomer
  • *
  • Posts: 4
    • 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: 21575
    • 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: 4
    • 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: 21575
    • 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: 4
    • 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: 21575
    • 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: 4
    • 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