in reply to Re^2: split string using regex
in thread split string using regex
Try this:
while( $line =~ /(\w+)=("[^"]+"|\S+)/g ) { print "$1: $2\n"; }
Warning: no guarantees if your string is not well-formed.
In Section
Seekers of Perl Wisdom
in reply to Re^2: split string using regex
in thread split string using regex
Try this:
while( $line =~ /(\w+)=("[^"]+"|\S+)/g ) { print "$1: $2\n"; }
Warning: no guarantees if your string is not well-formed.