Macro for invalid email addresses?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Keat Oh

Macro for invalid email addresses?

Post by Keat Oh »

Greetings:
I was wondering if anyone can help me figure out how to create a macro to remove invalid email addresses. My specific application is to remove email addresses that has 2 or more "@" signs.

Example:
change this:
abc@abc.com
abc@abc@abc.com
123@123.com

to this:
abc@abc.com
123@123.com

Thanks,
Keat
Keat Oh

Re: Macro for invalid email addresses?

Post by Keat Oh »

Greetings:

I got it. The RE is:

@.*@

I just record a macro that delete the above result.


:)
Keat Oh

Re: Macro for invalid email addresses?

Post by Keat Oh »

Below is what I received from the TextPad support people:

--------------------------------------------------
Hello Keat,

Please try implementing the following procedure in TextPad:


1. Open the Replace dialog box
2. Type or paste "^[a-z]+@.+@.+" without the quotes into the "Find what"
section
3. Leave the "Replace with" section empty
4. Under the heading "Conditions", check "Text and Regular expression"
5. Ensure the curser is at the beginning of the document
6. Click Replace All

I have used POSIX regular expression syntax, which can be selected from
the Editor page of the Preferences dialog box.

I hope this helps.


Kind regards,

Helios Software Solutions
Post Reply