Jump to content

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


laf
 Share

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

Recommended Posts

  • Newbies

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.

Link to comment
Share on other sites

  • Newbies

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...).

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

[email protected]@c

[email protected] [email protected]

Both of these are found by plain *@*@. The string [email protected][email protected] is NOT found with or without the ==. Very peculiar, thanks for pointing this out.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

This topic is 5594 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
 Share

×
×
  • Create New...

Important Information

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