Character Class Visualizer Tool
2020-06-12 - By Robert Elder
This article is part of Series On Regular Expressions.
About This Visualization Tool
The purpose of this visualization tool is to clearly illustrate which characters are matched by a given regular expression character class. For simple regular expressions like '[abc]' it is very easy to understand which characters will be matched, however, for a regular expression like '[^a-z^+\\\[]' this becomes much less clear. By entering the character class (or more generally, any regular expression at all), this visualization will compile the provided regular expression using your browser's default Javascript regular expression engine, and then test to see whether it will match each of the first 256 possible character code points.
Caveats
Since most Javascript engines use UTF-16, this will mean that the provided regex may match more characters than the ones that are shown above (any character above code point 256 for example). Furthermore, since the determination about whether to highlight a given character is decided by your own browser, there are some regex patterns that will cause the set of highlighted character above to change depending upon which browser you view this page with and the level of support that browser has for various regular expression features.
The Regular Expression Visualizer, Simulator & Cross-Compiler Tool
Published 2020-07-09 |
$20.00 CAD |
Regular Expression Character Escaping
Published 2020-11-20 |
How Do Regular Expression Quantifier Work?
Published 2020-08-18 |
Interesting Regular Expression Test Cases
Published 2020-07-09 |
How Regular Expression Alternation Works
Published 2020-08-18 |
Character Ranges & Class Negation in Regular Expressions
Published 2020-05-31 |
Guide To Regular Expressions
Published 2020-07-09 |
Join My Mailing List Privacy Policy |
Why Bother Subscribing?
|