in reply to Re: Regex Report
in thread Regex Report

I would make your example a little safer:
my %data = $_ =~ m{ ([^=\s]+) \s* = \s* ["']? ( (?<= ' ) [^']* (?= ' ) | (?<= " ) [^"]* (?= " ) | (?<!['"]) \S+ (?! ['"] ) )["']? }xg;
That, to me, seems safer, because it ensures a string that starts quoted ends quoted, and a string that doesn't start quoted doesn't end quoted (for some bizarre reason).
_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;