note
TJPride
Your regular expression works, but the code is rather a muddle. Here's a version that he can use to test with:<p>
<code>$data = join '', <DATA>;
print "$_\n" for $data =~ m[\@include\s('[^']+'|"[^"]+"|.+?(?<!\\))\s]g;
__DATA__
#some "random stuff" @include "some file" did you parse that?
#more 'random' stuff @include 'another file' you sure?
#and more random stuff @include yet\ another\ file positive?</code>
942167
942168