in reply to Re: Regex Report
in thread Regex Report
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).my %data = $_ =~ m{ ([^=\s]+) \s* = \s* ["']? ( (?<= ' ) [^']* (?= ' ) | (?<= " ) [^"]* (?= " ) | (?<!['"]) \S+ (?! ['"] ) )["']? }xg;
|
|---|