I have the following PHP regex
preg_match('/[\/\/\*] First: (.*)\n[\/\/\*] Second: (.*)\n/i', $some_string)
but for some reason it will not match this text:
// First: a string
// Second: another string
I tried changing line endings between Windows and Unix style, this did nothing. I also tried splitting up the regex to match First and Second separately; this worked but when I put them both together they no longer match the sample text. It seems to have something to do with the space after the second [\/\/\*].. any ideas?
Note I can't change the regex; this is client code that I reversed because they don't provide documentation. This code looks for certain pattern in PHP files in order to load them as 'plugins' in their product. Really I'm trying to guess what header I need to add to these PHP files so they will correctly be recognized as plugins.