in reply to Re^2: Extract delimited words from string
in thread Extract delimited words from string

A dedicated module is better, but if you're shy of that, another approach:

c:\@Work\Perl\monks>perl use strict; use warnings; my @lines = ( '50 0 "R0 G255 B0 A255" "Solid" 118 1 "R0 G0 B0 A255" "R0 G0 B0 A255 +" 0', '70 0 "R0 G255 B255 A255" "Solid" 118 1 "R12 \"G12\" B12 A255" "R12 +G12 B12 A255" 0', ); my $rx_dq = qr{ " [^"\\]* (?: \\. [^"\\]*)* " }xms; for my $line (@lines) { my @d_quoted = $line =~ m{ $rx_dq }xmsg; print "@d_quoted \n"; } ^Z "R0 G255 B0 A255" "Solid" "R0 G0 B0 A255" "R0 G0 B0 A255" "R0 G255 B255 A255" "Solid" "R12 \"G12\" B12 A255" "R12 G12 B12 A255"


Give a man a fish:  <%-{-{-{-<