Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

C#

Sie können den statischen Aufruf nutzen, wenn Sie nur wenige Strings mit dem gleichen regulären Ausdruck bearbeiten wollen:

string resultString = Regex.Replace(subjectString,
                      @"(?<left>\w+)=(?<right>\w+)", "${right}=${left}");

Erstellen Sie ein Regex-Objekt, wenn Sie den gleichen regulären Ausdruck für viele Strings nutzen wollen:

Regex regexObj = new Regex(@"(?<left>\w+)=(?<right>\w+)");
string resultString = regexObj.Replace(subjectString, "${right}=${left}");


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial