Regex String Generator
Result:
Supported Patterns
| Pattern | Description | Example Input | Example Output |
|---|---|---|---|
| \d | Any digit from 0 to 9. | \d\d | 42, 07 |
| \w | Any word character (letters, digits, underscores). | \w\w\w | abc, 1X_ |
| \s | Any whitespace character (space, tab, newline). | \s\s | ␣␣, \t␣ |
| \D | Any non-digit character. | \D\D | AB, — |
| \W | Any non-word character. | \W\W | **, @# |
| \S | Any non-whitespace character. | \S\S\S | abc, a1b |
| {n,m} | Insert between n and m times. | \d{2,4} | 12, 4321 |
| [abc] | Insert any one of the characters a, b, or c. | [abc]{3} | abc, cab |
| [^abc] | Insert any character except a, b, or c. | [^abc]{3} | xyz, 123 |
| [a-z] | Insert any character in the range from a to z. | [a-z]{3} | abc, xyz |
| [0-9]{3:5} | Insert any character in the range from a to z. | [0-9]{3:5} | 00372, 00221 |
| \i+ | Insert an incrementing value. | \i+\d\d | 1300, 1301 |
| \i- | Insert a decrementing value. | \i-\d\d | 1299, 1298 |
| \i{:5} | Insert a decrementing value. | \i{:5} | 01299, 01298 |
| \a | Insert a random string from an array of values. | \a | apple, banana |
| \a+ | Insert a string from an array in ascending order. | \a+ | apple, banana |
| \a- | Insert a string from an array in descending order. | \a- | cherry, banana |
| () | Group characters. | (\d\d) | 42 |
| \1 | Backreference to the first captured group. | (\d\d)\1 | 4242 |
| | | Alternation; insert either the expression before or after. | a|b | a, b |
This project provides a powerful and flexible string generator based on regex-like patterns, with support for features such as character classes, custom repeats, array-based string selection, incremental values, and more. The application can be compiled and used both as a native Rust library and in a WebAssembly (WASM) context.
Github link here