Skip to content

Instantly share code, notes, and snippets.

@nitinthewiz
Created December 15, 2015 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nitinthewiz/89af94130dede774df81 to your computer and use it in GitHub Desktop.
Save nitinthewiz/89af94130dede774df81 to your computer and use it in GitHub Desktop.
Finding text without a particular string in Sublime text
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