Skip to content
Advertisement

Tag: operator-precedence

PHP: Regex match string not preceeded by a dollar sign

In my syntax highlighter, I use regex to parse different terms. Below is how I parse PHP classes: Now, just ignore the PHP class and the _getHtmlCode function. The regex, “/b{$class}b/”, matches names such as count. If I make a variable named $count, it matches that was well. How can I look for class names that are not preceded by

Advertisement