Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Any URL not .com/.net/.org

Last post 06-28-2009, 8:03 PM by Aussie Susan. 1 replies.
Sort Posts: Previous Next
  •  06-27-2009, 3:48 PM 54366

    Any URL not .com/.net/.org

    I have been trying to make a filter for my incoming mails.  I want to put any mails with other Urls in a folder to check later if I want.

    I came up with http://([a-zA-Z0-9]*\.?)([a-zA-Z0-9]+)(\.)(tk|gs|mobi|co\.cc|in) but then figured there should be a way to say not .com,.net,.org so I can pick up any of the other extentions.

    http://([a-zA-Z0-9]*\.?)([a-zA-Z0-9]+)(\.)(com|org|net?!)  but I am not sure how to do the end part, I know ?! doesn't work but just showing where I am.

    I have been testing against

    http://domain.tk/whatever
    http://www.domain.tk/whatever
    http://whatever.domain.tk/whatever
    http://domain.tk
    http://domain.tkdsadasd
    http://whatever.domain.tk/
    http://domain.tk/
    http://domain.tk/.
    http://domain.tk.
    http://www.domain.tk/.
    http://adasdasd.domain.tk.

    I don't need any information returned I just need to know if 'http://*.domain.tk', 'http://*.domain.gs', 'http://*.domain.in' or any of those other extensions exist. 

    Any help or ideas appreciated. 

  •  06-28-2009, 8:03 PM 54396 in reply to 54366

    Re: Any URL not .com/.net/.org

    I'm sorry but I'm confused as to what you are trying to do. The first part of your posting talks about .com, .net and .org but the examples and latter text talk about .tk, .gs and .in!!!

    Perhaps if you read the posting guidelines in the sticky note at the beginning of this forum and provide the information requested there we might be able to help you better.

    Given that, I THINK you are looking at negative lookaheads, but as you have not said the regex variant you are using I have no idea if this will work or not. 

    Susan 

View as RSS news feed in XML