http://www.perlmonks.org?node_id=942171


in reply to Help with a regular expression for file name parsing

Surely such a format has a parser already , but anyway, I'm sure this will work, untested

my $pat = qr~ \@include \s+ ( (?: '[^']*' ) | (?: "[^"]*" ) | (?: (?:\\.) | [^\\s] )+ ) ~x;

[^" makes a good search term to find regex for similar formats, like ?node_id=3989;BIT=%5B%5E%22 -> Re^3: More robust link finding than HTML::LinkExtor/HTML::Parser?, Re: skip over an escaped single quote