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

Parsing a text file

Last post 05-14-2008, 11:20 AM by scripter. 2 replies.
Sort Posts: Previous Next
  •  05-13-2008, 11:06 PM 42224

    Parsing a text file

     

     

    Can someone help me build a regex that parses this txt file for only the top level domains that have more then 2 characters and does not have special characters in it

    http://data.iana.org/TLD/tlds-alpha-by-domain.txt

    I say no special chaters due to the lines like this XN--0ZWM56D

  •  05-13-2008, 11:33 PM 42226 in reply to 42224

    Re: Parsing a text file

    Depending on the regex engine, programming language and the hardware platform you are using, then either

    ^[a-z]{3,}$

    or

    ^[a-z]{3,}\r$

    with the 'multiline' and 'ignore case' options set should do the trick.

    If not, then please read the posting guidelines and provide us with the additional information and what is not working.

    Susan

     

  •  05-14-2008, 11:20 AM 42252 in reply to 42226

    Re: Parsing a text file

    I will be testing this out later today.

    Sorry I did not give the additional info

    ASP.NET C# backend

View as RSS news feed in XML