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

class subtraction in .NET

Last post 07-10-2008, 3:49 PM by ddrudik. 0 replies.
Sort Posts: Previous Next
  •  07-10-2008, 3:49 PM 44001

    class subtraction in .NET

    I just re-read through portions of Friedl's book and I noticed something I missed previously.

    .NET (Along with other platforms such as Java) allow for class subtraction.

    Normally without class subtraction if you wanted to match any number except 4 you would need to do one of the following:

    [0-35-9]

    (?!4)\d

    (?=[^4])\d

    But with class subtraction (.NET example shown) you can also do this:

    [\d-[4]]


View as RSS news feed in XML