I have a working command line code using pcregrep for finding all PHP with space after closing tag:
pcregrep -rMl '\?>[\s
]+\z' *
I get that here: Find extra space / new line after a closing ?> (php tag)
Now I want to know what is the equivalent command above finding all spaces before PHP opening tag at the beginning of the PHP file:
[SPACE HERE]<?php
If you know how to do this, please share thanks.