O'Reilly logo

Extending MFC Applications with the .NET Framework by Nishant Sivakumar, Tom Archer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Regex Class to Split Strings

The Regex class—defined in the System::Text::RegularExpressions namespace—encapsulates an immutable expression. By that, I mean that an instantiated Regex object can only represent the expression that was used to construct it. As a result, if you want to modify an expression once it's been used in the construction of a Regex object—or if you want to use multiple expressions—you'll need to construct a distinct Regex object for each desired modification or new expression. While at first blush this may seem like a limitation, as you work your way through the chapter, I'll bring this point into play at the appropriate times so that you see that the immutability of the Regex class is not a problem. I mention ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required