Regular Expression Separator

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.