我需要替换(或更好地删除)字符串,在此我知道开始和结束。
有些字符是未知的,字符串的长度也是未知的。
当然,我可以使用子字符串和其他c#字符串操作,但是没有简单的替换通配符选项吗?
mystring.Replace("O(*)", "");
Run Code Online (Sandbox Code Playgroud)
Would be a nice Option.
I know that the string Begins with O( and Ends with ).
It's possible than the String Looks like O(something);QG(anything else)
Here the result should be ;QG(anything else)
Is this possible with a simple replace?
And what About the advanced Option, that he string exists more than one time like here:
O(something);O(someone);QG(anything else)