Title: Exclude posts or regex?
Last modified: August 21, 2016

---

# Exclude posts or regex?

 *  [basememara](https://wordpress.org/support/users/basememara/)
 * (@basememara)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/exclude-posts-or-regex/)
 * Is there a way to exclude posts or maybe a scenario where there is an existing
   class name in the code tag?
 * I have legacy posts that were imported and already have inline styles. I want
   to exclude those older posts but use Crayon going forward.
 * Here is an example of what I’m trying to get Crayon to ignore, or would like 
   to exclude a range of posts.
 *     ```
       <code style="color: #008200;">//My code comments here</code></span></div>
       <div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">var</code> <code style="color: #000000;">App = {};</code></span></div>
       <div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"> </span></div>
       <div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"><code style="color: #000000;">(</code><code style="color: #006699; font-weight: bold;">function</code> <code style="color: #000000;">() {</code></span></div>
       <div style="background-color: #ffffff;"><code>    </code><span style="margin-left: 12px !important;"><code style="color: #000000;">...</code></span></div>
       <div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"> </span></div>
       <div style="background-color: #ffffff;"><code>    </code>
       ```
   
 * [https://wordpress.org/plugins/crayon-syntax-highlighter/](https://wordpress.org/plugins/crayon-syntax-highlighter/)

The topic ‘Exclude posts or regex?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/crayon-syntax-highlighter_b0c4c0.
   svg)
 * [Crayon Syntax Highlighter](https://wordpress.org/plugins/crayon-syntax-highlighter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/crayon-syntax-highlighter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/crayon-syntax-highlighter/)
 * [Active Topics](https://wordpress.org/support/plugin/crayon-syntax-highlighter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/crayon-syntax-highlighter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/crayon-syntax-highlighter/reviews/)

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [crayon](https://wordpress.org/support/topic-tag/crayon/)

 * 0 replies
 * 1 participant
 * Last reply from: [basememara](https://wordpress.org/support/users/basememara/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/exclude-posts-or-regex/)
 * Status: not resolved