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;
In reply to Re^2: Regex Report
by japhy
in thread Regex Report
by japhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |