String Pattern Analyzer Plugin

I’ve created a plugin to explain String Patterns in a more expressive form.

For instance the pattern utf8.charpattern [%z\x01-\x7F\xC2-\xF4][\x80-\xBF]*


Escape sequences are interpreted, so for example \x5B\x41\x42\x43\x5D becomes [ABC]

There is also a Tester for string patterns, which will dump out all info of matching a pattern on a string.


Bounds are where the match starts and ends. (you can get this from captures by adding () to the start and end)

The size of the output and input can be controlled by dragging the middle portion.

Here is the plugin

Any feedback is welcome.

18 Likes

What’s the utility of this plugin? I’m a little confused since the explanation is rather vague and the patterns are completely out of the question (most people will not even know what these are - a basic pattern maybe, but there’s only hex patterns here).

Is this plugin just intended to, well, as the name states, analyse string patterns and help you in figuring out what to use should the need for a string pattern be apparent? Does it describe an inputted pattern? What goes for testing patterns against a certain string?

It’s to describe the string pattern inputted in words, since string patterns aren’t wholly expressive. If describing the pattern helps you figure out what pattern to use, I guess? When you’re writing the pattern, you will probably know what it does, so this wont help. I could add a reference (like documentation for patterns?), if that would be helpful. As for testing a pattern against a certain string, this plugin doesn’t have that. That does sound like something useful, so I will probably add it.
Edit: Added.

2 Likes