in reply to Re: Split this string
in thread Split this string
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);
|
|---|