Use Regular Expressions to Analyze Content

TaxoPress Pro allows you to use Regular Expressions to change how Auto Terms analyzes your posts.

By default, TaxoPress runs this code to determine if a term exists in content:

if(strpos($content, ' '.$term.' ') !== FALSE) {//add $term}

That code will change slightly if the “Whole words” setting is unchecked in the “Options” tab.

The "Whole words" setting

If that box is unchecked, TaxoPress will add terms even if they are not part of a whole word. In that situation, TaxoPress uses this code:

stristr( $content, $term )

You can add your own Regular Expressions under the “Advanced” tab of TaxoPress Pro.

An example regular expression /\b({term})\b/i will match the whole word. TaxoPress will replace {term} with the term name before the regex action.