Page 1 of 1

need some regex help for homesite 5.5

Posted: Mon Oct 16, 2006 10:39 am
by Burrito
I'm not 100% sure which regex engine homesite natively uses. I know it can use the posix engine, but I also know it has some PCREesque characteristics as well.

in any case. I need a regular expression to find email addresses that start with support@ but have different domain names than domainx.com.

in other words, I might have 15 documents with email addresses in them:

support@mydomain.com
support@blingbling.com
support@whatever.com
support@domainx.com
support@blahbling.com
....

of those listed, all but 1 would match. (the support@domainx.com).

can anyone assist with this?

thx,

Burr

Posted: Mon Oct 16, 2006 10:40 am
by feyd
why not just search out "support@"?

Posted: Mon Oct 16, 2006 10:43 am
by Burrito
because then I'll have literally tens of thousands of matches and I don't want to have to weed through them all to find out which ones are NOT support@domainx.com.

I only want to list out the ones that are NOT support@domainx.com.

Posted: Mon Oct 16, 2006 10:55 am
by feyd
Ahh, I misread your post before. I thought you wanted all the support addresses. Didn't see the exclusionary bit.

From looking at a few pages, I don't think Homesite supports assertions.

If you used grep, you could write an assertion:

Code: Select all

[feyd@home]>more addresses.txt
support@mydomain.com
support@blingbling.com
support@whatever.com
support@domainx.com
support@blahbling.com

[feyd@home]>grep -Pin "^support@(?!domainx\.com)" addresses.txt
1:support@mydomain.com
2:support@blingbling.com
3:support@whatever.com
5:support@blahbling.com