Partilhar via


Regex Char Class Subtraction spec available [Kit George]

I propped the character class subtraction specification up on the BCL website:

https://www.gotdotnet.com/team/clr/bcl/TechArticles/techarticles/Specs/Regex/CharacterClassSubtraction.doc

This feature will be one of the many enhancements we make to Whidbey, so keep an eye out for it in Beta1.

Any feedback on the specification is appreciated!

Comments

  • Anonymous
    March 09, 2004
    The comment has been removed
  • Anonymous
    March 09, 2004
    Would you consider adding a flag to enable/disable this new behaviour it might be easier to port
  • Anonymous
    March 09, 2004
    Matt, thanks for that, and I agree: a pretty clear copy/paste error! I'll get that updated
  • Anonymous
    March 10, 2004
    Dmitriy, we didn't consider this, mostly becuase the cases where there may be conflict with existing expressions are obscure enough that we don't believe we'll break any existing code.

    What are you porting to?
  • Anonymous
    April 13, 2004
    I saw another minor (but confusing) error toward the bottom of page 3. Under "Impact on Current Behavior", you have a paragraph that starts "Today, this will be interpreted as ‘any a through e character, minus sign, open square bracket, b, d, or close square bracket, immediately followed by a close square bracket’." I think you need to take out the "or close square bracket" -- i.e., the character class will not match a right square bracket; the first ] ends the character class, the second ] is matched as a literal, and neither is part of the character class today.

    It might also be nice if you would include a brief mention of how you can make a character class that does include a square bracket, and whether that syntax is affected by the new feature. Do you escape it with a backslash?
  • Anonymous
    May 04, 2004
    Joe, nice pick: I just updated the file (check for the update in around a day). I fixed the first part, and I like the second suggestion, I simply have to explore getting that kind of feedback incproporated into the docs, instead of simply this file here, so I'm going to be looking at that option.

    Thanks for the deeback!
    Kit