@a = split /(?<!\\)(?:\\\\)*&/, "a=1&b=2\\&3&c=4"; print join("|",@a)."\n"; @b = split /(?<!\\)(\\\\)*&/, "a=1&b=2\\&3&c=4"; $b[$_] .= splice @b, $_ + 1, 1 for (0..($#b/2)); print join("|",@b)."\n";
In reply to RE: split unless escaped
by Anonymous Monk
in thread split unless escaped
by da'ud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |