A modern language that cross-compiles to regular expressions.
Pomsky, the "Next Level Regular Expressions" tool.
Here's a summary of its utility and key features:
Simplified Syntax: Pomsky is designed to be easy to write and understand, making regular expressions more accessible. It offers a "saner syntax" compared to traditional regex.
Instant Feedback: The application provides syntax highlighting, autocompletion, and diagnostics in VSCode, aiding in the development process.
Built-in Tests: Pomsky includes automated tests to catch mistakes, which also serve as documentation.
Feature-Rich: It incorporates powerful features not found in other regular expression tools.
Great Compatibility: Pomsky expressions are transpiled to standard RegExp's, allowing their use anywhere regular expressions are supported.
Optimized Output: Users can be confident that the generated expressions will perform well.
Examples: The source provides a variety of examples demonstrating the syntax and capabilities of Pomsky, such as string matching, character sets, and named groups, among others. These examples include:
Basic string matching: 'Hello' [space]+ ('world' | 'pomsky')
Anchors and quantifiers: ^ % 'foo' % $ 'hello'{1,5}
Character classes and ranges: ['acd[]' 'p'-'s' digit]
Negation: !['^'] # negated
Unicode categories: [s U+15 U+FEFF Greek]
Named groups: :named(.)
Lookarounds: (<< 'foo' | 'bar') (!>> 'foo' | 'bar')
Ranges: range '0'-'255'
Variables: let number = '-'? [digit]+; let op = ['+-/']; number (op number)
In essence, Pomsky aims to improve the experience of creating regular expressions by providing a more user-friendly and feature-rich alternative to standard regular expression syntax.