How can I split the string one by one, but ignore the escaped character? Here is my example, I have a line: -
\ntest\rtest\n
I want it to be like this: -
Array ( [0] => \n [1] => t [2] => e [3] => s [4] => t [5] => \r [6] => t [7] => e [8] => s [9] => t [10] => \n )
Someone said to use preg_split, but I know little about regex.
source share