Home Cooker Classes Others Rice CookerGX
Classes  >  regex  >  Delete(string)
regex class : Delete(string) method

Description

Gets a string that deleted all strings that match a regular expression pattern in a input string.

Syntax

regexInstance.Delete(string source)

Arguments

ClassNameDescription
stringsourceA string which is searched.

Return value

ClassDescription
stringA string after deleting.

Sample code

//anyRegex is an any instance of regex type.

regex anyRegex = new regex("a+");

string result = anyRegex.Delete("aaabbbaaccc");//result is "bbbccc".

Notes

It's a wrapper of the System.Text.RegularExpressions.Regex.Replace(String,String).

Links for reference

Copyright © Rice All rights reserved.