WordPress.org

Ready to get started?Download WordPress

Forums

Crayon Syntax Highlighter
[resolved] Regex problem (2 posts)

  1. andrespenaloza
    Member
    Posted 1 year ago #

    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/

  2. andrespenaloza
    Member
    Posted 1 year ago #

    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);

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags