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

Matching number patterns.

  •  05-28-2011, 8:12 PM

    Matching number patterns.

    Hello, Is there a way to match number patterns and sequences? In my setup I have the numbers 1 to 6, each pattern contains three numbers. Matches should be any triple, any double, 123 and 456. Any mutation of these should be a match too (eg. 122, 212, 123, 312, 645, 666, etc). If possible I would also like to filter the leftover number from a double match (eg. the 1 from 122). It can be a separate regex for each pattern. I'm just wondering if this is possible since I would have to do some crazy if-stuff for that. Thanks in advance.
    Filed under:
View Complete Thread