Created
December 15, 2015 00:58
-
-
Save nitinthewiz/89af94130dede774df81 to your computer and use it in GitHub Desktop.
Finding text without a particular string in Sublime text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sublime Text uses PCRE which is Perl Regex. | |
The following RegEx - | |
(<\?)(?:(?!php)) | |
will match | |
<? blah ?> | |
but not | |
<?php blah ?> | |
Tested at https://regex101.com/ | |
Useful to find bad coding practises such as using <? instead of <?php to start a php block of code. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment