Dig a few common and useful heavy-duty-split

Source: Internet
Author: User

Split this basically all the program developers use, generally use single character and long string to split the string of more, in fact, there is an overload is very useful, that is, a variety of composite characters to split.
For example: "AAAAAAAAAA{@}BBBBBBBBBB{@}CCCCCCC#CCCCCC";
The AAAAAAAAAA, BBBBBBBBBB, and CCCCCCC#CCCCCC arrays are split by the {@} combination character;

string"aaaaaaaaaa{@}bbbbbbbbbb{@}ccccccc#cccccc";//1、单组合{@}拆分stringnewstring"{@}" };//2、多组合{@}、#拆分 stringnewstring"{@}""#" };string[] arry = sql.Split(separator, StringSplitOptions.RemoveEmptyEntries);

Well, split combination character split in general, no technical content, the focus is to dig a dig, perhaps useful to you ~

Hope that the above share of the beginner friends some help, thank you!
More Attention Fuyi Technology blog: Http://blog.csdn.net/fuyifang
or scan the QR code directly with your phone to see more Posts:

Dig a less common and useful overload-split

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.