How to use string.split() for both CRLF and whitespace ? Do I need regexp?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unfortunately AS3 does not allow you to split after an array of chars, like the classic OO languages (C#, Java, C++).
You would have to use a RegExp for the second param of String.Split:
\n Matches a newline character.
\r Matches a return character.
\t Matches a tab character.