# CodeMirror Regex Code Editor Demonstration

The Regex parser for CodeMirror allows syntax coloring on regular expressions with some beginning customizability by Regex flavor/language. For integrating styling of regular expression literals into JavaScript syntax highlighting, see this JavaScript+Regex Demo.

Styling ability is fine-grained, so any token should be distinctly stylable if so desired. Parenthetical groups can be styled with the same styles for inner content, and the script also enables styling by nesting depth and sequence, including by imposing a limit such that styles will alternate.

Information can also be passed on (especially when the parseregex-unicode.js file is included) for use in CodeMirror's activeTokens argument such as demonstrated below by tooltips which show which characters are present in a given range or Unicode class.

Note that this editor does not support free-spacing mode, so it is not recommended to use multiple lines for input, but for demonstration purposes, multiple lines are shown.

(?ix)/some(group)and more(?:unnumbered)and(?=sth)but(?!not) (\k<named_$>b.ckref) (?#a comment) # some space fdd[^]aa[]ddf[\45-\55\67]sfa[\ca-\cb\cd]sdf\cdf\p{No}ddf[\a-\q]dffd[\u0033-\u0640\u0747]+?f*?df[\034-\038\u039]d [\xaf-\xbf]fdfe{1}dfsd{2,3}--fakj{3,}f[^ab]df\39d[^a-ze-]a076df[\u00a0-\u00f0][\u0010\49\077\xaf]ffa[--q]ds[*--]ad[-ad\qfw]fd\qad\p{^a}fdf\P{a}a[ab-cd]\x11\u0123\ca\34df/gi