1 2 3 4 5 6 7 8
#!/usr/bin/perl use warnings; use strict; my $string = "testxtest"; $string =~ s/([^x])/\n$1\n/g; print $string;
[^x]