/<\?php\s(\/\*(?:[^*]|\n|(?:\*(?:[^\/]|\n)))*\*\/)\s/
Test in: http://www.rubular.com/
/<\?php\s(\/\*(?:[^*]|\n|(?:\*(?:[^\/]|\n)))*\*\/)\s/
Test in: http://www.rubular.com/
Thank you. I ended up using this /\s(?:\/\*(?:[^*]|(?:\*[^\/]))*\*\/)\s/g
to have all comments in a file. I guess the \n
parts can be safely removed from the expression 😄
Thanks for this! Saved me some time.