I'm actually using perl, but php can use perl syntax for regex... and not having any luck on the perl forums
I'm trying to account for possible carriage returns in a file.
I'm looking for: <meta name="author" content="John Doe">
But sometimes there's extra spaces by accident or even a carriage return
This works fine for extra spaces:
/<meta name="author" content="[azAZ '-]?">/is
and this works fine for only carriage returns:
/<meta (\r|\n)name="author" (\r|\n)content="[azAZ '-]?">/is
and this works fine if there's only one or the other:
/<meta (\r|\n)name="author" (\r|\n)content="[azAZ '-]?">/is
but if there's spaces and carriage returns it doesn't work.
Oh, maybe it's (\r\n) without the or???
*note, i'm running my perl script against local files on a windows 2000 box, not Unix/Linux.
help