Good morning,
Let's say I have the following code that allows you to remove any spaces from each line in a given list:
foreach (String StrTmp in SomeList)
Regex.Replace(StrTmp, @"\p{Z}", "", RegexOptions.Compiled)
Since the documentation RegexOptions.Compiledsays that “It gives faster execution, but increases startup time”, I would like to know if this refers to an increase in startup time for the entire program launch or refers to the launch of each Regex.Replacecall inside the loop, thereby making the whole loop slower .
By the way ... Is there any command Regex.Remove(.,.)to remove every occurrence of a given regular expression? Basically this is the same as above, but can be shorter and more elegant.
Many thanks.
source
share