How to use string.split() for both CRLF and whitespace ? Do I need regexp?
+1
A:
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.
Bogdan Gavril
2009-02-12 12:40:00
so what would be the whole regexp like split (a, "/\s+$/");
Tom
2009-02-12 13:08:50
you can use groups and the OR operator: |
Bogdan Gavril
2009-02-12 13:42:35