I used \s* in place of (?:^| ) to make it work across blank lines.
use strict; use warnings; my $string = <<HTML; this=x that=x x another=x thing=x van=x x x diesel=xx xx HTML my @array2 = $string =~ /\s*(.+?)(?=\s+\w+=|$)/g; print "[$_]\n" foreach (@array2);
In reply to Re^2: Split this string
by Lotus1
in thread Split this string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |