regex help needed

So i need to write 2 regexes, one needs to match the following:

somedomain.com where somedomain can be any length

another regex that matches the following:

someword-international.com or something-intl.com

the regexes must be mutually exclusive.

the problem i am having is that if i write

[^int].*?\\.com

as the first regex, then it wants to have atleast 3 letters which arent "int" so i cant have aa.com match correctly for the first regex

[506 byte] By [mkoryaka] at [2007-11-27 6:21:56]
# 1
are you working on our program, lol?what is the difference in the 2nd address?are you looking for the hyphen - or the word 'international'?
TuringPesta at 2007-7-12 17:38:45 > top of Java-index,Java Essentials,Java Programming...
# 2
i am looking for an address which has the word intl or international before the .com that is the difference, if the string has intl or international before the .com then it matches #2, else if it ends in .com and doesnt have intl or international before the .com then it matches #1
mkoryaka at 2007-7-12 17:38:45 > top of Java-index,Java Essentials,Java Programming...
# 3
this seems to work:1)match .com not preceeded by intl or interantional but not #2((?:[^i][^n][^t])*?.*?[^l]\\.com$)2)match .com preceeded by intl or interational but not #1(int\\w*l\\.com$)if anyone sees a better solution, please do tell!
mkoryaka at 2007-7-12 17:38:45 > top of Java-index,Java Essentials,Java Programming...
# 4
Try these: [\w-]+(?<!int(?:ernationa)?l)\.com[\w-]+(?<=int(?:ernationa)?l)\.com
uncle_alicea at 2007-7-12 17:38:45 > top of Java-index,Java Essentials,Java Programming...
# 5
ah, nice now i think i fully understand the need for the "zero-width"-ness of it!thanks.
mkoryaka at 2007-7-12 17:38:45 > top of Java-index,Java Essentials,Java Programming...