use warnings; use strict; use Data::Dumper; "
" =~ /(?.*?)((?!\< *\/[\w\d\-]+\>).)*/; print Dumper(\%+); __END__ $VAR1 = { 'start' => '' }; #### ---------------------------------------------------------------------- .*? any character except \n (0 or more times (matching the least amount possible)) ----------------------------------------------------------------------