Title: Regex problem
Last modified: August 20, 2016

---

# Regex problem

 *  Resolved [andrespenaloza](https://wordpress.org/support/users/andrespenaloza/)
 * (@andrespenaloza)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/regex-problem/)
 * Hi, im writing a new language, and im having trouble writing a Regex expression.
   I want to select a word which is uppercase(and may have digits, or “_”).
 * im wrote:
    \b[A-Z_][A-Z\d_]+\b
 * but, for some reason, its giving the same results as:
    \b[a-z_][a-z\d_]+\b
 * [http://wordpress.org/extend/plugins/crayon-syntax-highlighter/](http://wordpress.org/extend/plugins/crayon-syntax-highlighter/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [andrespenaloza](https://wordpress.org/support/users/andrespenaloza/)
 * (@andrespenaloza)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/regex-problem/#post-3146126)
 * I’ve fix’d it. For some reason, the parser code was set to CASE_INSENSITIVE=TRUE.
 * Just need to change line 20 in crayon_parser.class.php to:
 * private static $modes = array(self::CASE_INSENSITIVE => FALSE, self::MULTI_LINE
   => TRUE, self::SINGLE_LINE => TRUE, self::ALLOW_MIXED => TRUE);

Viewing 1 replies (of 1 total)

The topic ‘Regex problem’ 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

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

 * 1 reply
 * 1 participant
 * Last reply from: [andrespenaloza](https://wordpress.org/support/users/andrespenaloza/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/regex-problem/#post-3146126)
 * Status: resolved