! ====================================== ! Syntax Highlighting Patterns for Regex ! ====================================== ! ! Author: Christopher Conrad ! ! Contact: ConradCV@ROSES.BNA.Boeing.com ! nedit.highlightPatterns:\ regex:1:0{\n\ Comments:"(?#This is a comment!)\\(\\?#[^)]*(?:\\)|$)":::Comment::\n\ Literal Escape:"(?#Special chars that need escapes)\\\\[abefnrtv()\\[\\]<>{}.|^$*+?&\\\\]":::Preprocessor::\n\ Shortcut Escapes:"(?#Shortcuts for common char classes)\\\\[dDlLsSwW]":::Character Const::\n\ Backreferences:"(?#Internal regex backreferences)\\\\[1-9]":::Storage Type::\n\ Word Delimiter:"(?#Special token to match NEdit [non]word-delimiters)\\\\[yY]":::Subroutine::\n\ Numeric Escape:"(?#Negative lookahead is to exclude \\x0 and \\00)(?!\\\\[xX0]0*(?:[^\da-fA-F]|$))\\\\(?:[xX]0*[1-9a-fA-F][\\da-fA-F]?|0*[1-3]?[0-7]?[0-7])":::Numeric Const::\n\ Quantifiers:"(?#Matches greedy and lazy quantifiers)[*+?]\\??":::Flag::\n\ Counting Quantifiers:"(?#Properly limits range numbers to 0-65535)\\{(?:[0-5]?\\d?\\d?\\d?\\d|6[0-4]\\d\\d\\d|65[0-4]\\d\\d|655[0-2]\\d|6553[0-5])?(?:,(?:[0-5]?\\d?\\d?\\d?\\d|6[0-4]\\d\\d\\d|65[0-4]\\d\\d|655[0-2]\\d|6553[0-5])?)?\\}\\??":::Numeric Const::\n\ Character Class:"(?#Handles escapes, char ranges, ^-] at beginning and - at end)\\[\\^?[-\\]]?(?:(?:\\\\(?:[abdeflnrstvwDLSW\\-()\\[\\]<>{}.|^$*+?&\\\\]|[xX0][\\da-fA-F]+)|[^\\\\\\]])(?:-(?:\\\\(?:[abdeflnrstvwDLSW\\-()\\[\\]<>{}.|^$*+?&\\\\]|[xX0][\\da-fA-F]+)|[^\\\\\\]]))?)*\\-?]":::Character Const::\n\ Anchors:"(?#\\B is the ""not a word boundary"" anchor)[$^<>]|\\\\B":::Flag::\n\ Parens and Alternation:"\\(?:\\?(?:[:=!iInN])|[()|]":::Keyword::\n\ Match Themselves:"(?#Highlight chars left over which just match themselves).":::Text Comment::D\n\ } nedit.languageModes:\n\ regex:.reg .regex:"\\(\\?[:#=!iInN].+\\)":None:Continuous:::