When I wrote a module today, I accidentally found a problem. Some regular expression separators in C # cannot be used.
For example:
System. Text. regularexpressions. RegEx r = new system. Text. regularexpressions. RegEx ("($ )")
Or:
String [] strarray = system. Text. regularexpressions. RegEx. Split (inputstring, "$ ")
These two statements are incorrect, that is, they do not serve as the separator you expect.
I tried it for a moment. Among these special characters, only "-", "%", "." and so on are used. Other characters are not studied in depth.
Of course, the above statements do not include Chinese characters or other non-English characters.
Due to the time relationship, I did not conduct any in-depth research, so there may be some discrepancies with the actual situation. However, I want to remind you that if they cannot be correctly separated in the future, consider changing the correct character.