Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Help - How can I find two occurences of a character within a field?


This topic is 6690 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I need to search a database of over 15,000 records to find email addresses that contain the @ symbol twice within the field. The second "@" is not immediately next to the first "@". I cannot figure out how to get this search in correctly. Any help is greatly appreciated. Thanks in advance.

  • Newbies
Posted

I tried *@*@ but it didn't work. (I know that I have at least one occurrence of the double @ in an email field, but this didn't find it.)

But thank you for your help! Any other suggestions? If I can't come up with something, I am going to have to manually look through the 510 page report (my head hurts just thinking about that...).

Posted

You should be able to do this in a text editor. If you can post a real sample of data, I'll work out the pattern to find and replace using Regular Expressions in a Grep, in TextWrangler (Free text editor from Bare Bones Software). and post them back for you.

HTH

Lee

Posted

I stand corrected, apparently the find is smarter than that, it does find them across words. The data must have had newlines in it, that's the only thing that doesn't seem to work without the ==.

Posted

Interesting. I didn't know that "zero or more characters" does NOT include ¶. But I don't see how adding == helps, on the contrary:

==*@*@ does NOT find:

a@b@c

a@b b@a

Both of these are found by plain *@*@. The string a@b¶a@c is NOT found with or without the ==. Very peculiar, thanks for pointing this out.

Posted (edited)

You need to add the final star yourself when using ==, so if you use: ==*@*@* it will find those also.

== is a request to search the entire field contents, where normal searches only search words or values (newlines separate values).

Edited by Guest
Posted (edited)

Hmm... There's still something weird going on here. What you say makes sense: a "normal" search should not cross word/value boundaries.

So *X*X* does NOT find "aXa aXa", nor "aXa¶aXa".

But it seems like replacing X with a word-delimiting character (other than space) is messing up the rules, because */*/* DOES FIND "a/a a/a", but NOT "a/a¶a/a" (two values).

Edited by Guest
Fixed a typo
Posted

I think its changing the search based on the fact that "/" is a word-break, so it ups your search to be on values. Searching for "*a*a*" doesn't find "/a/ /a/" which just reverses the two characters.

This topic is 6690 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.