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

Parse digit

Last post 12-02-2008, 12:59 PM by ddrudik. 2 replies.
Sort Posts: Previous Next
  •  12-02-2008, 12:26 PM 49063

    Parse digit

    Hello

    VB.NET regex.  Please help me to catch and remove the following digit pattern from a text file.  Each new line has a single digit, there would be 2 or 3 groups of those digits

    0
    1
    2

    0
    3
    4

    3
    3
    4

    Here is my set of regex [\r\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\d\r]
    Thank you.

  •  12-02-2008, 12:53 PM 49064 in reply to 49063

    Re: Parse digit

    To confirm you want to match those specific instances or any 0,1,2,3,4 on consective lines?  Please explain.


  •  12-02-2008, 12:59 PM 49065 in reply to 49063

    Re: Parse digit

    If you just want to match 2 or more lines of single digits:

    (?:\d\r\n)+\d

    If the last line will always have a \r\n after it that you want to remove:

    (?:\d\r\n)+


View as RSS news feed in XML