Regex Literal & Wildcard Builder
Turn plain search text or simple star/question-mark wildcards into escaped JavaScript regular expression sources and ready-to-copy constructor code.
Settings
Try the example or enter your own settings.
Using Regex Literal & Wildcard Builder
Turn plain search text or simple star/question-mark wildcards into escaped JavaScript regular expression sources and ready-to-copy constructor code.
- Enter plain search text, one pattern per line. Select literal text or simple wildcard syntax.
- Choose entire-string or contains matching and case sensitivity. Generate the regex sources.
- Copy constructor code from the report, export the CSV table, or open Regex Tester to try the patterns on your own samples.
Example
Try the included editable example. Choose entire-string or contains matching and case sensitivity. Generate the regex sources.
Questions & answers
What is escaped in literal mode?
Regular expression metacharacters are escaped so punctuation such as dots, plus signs, brackets and parentheses matches itself. The output is for a standalone JavaScript RegExp constructor, not a slash-delimited literal or arbitrary pattern concatenation.
What do wildcards mean?
An asterisk matches zero or more characters; a question mark matches one Unicode code point. Both can match line breaks or slashes. Other characters are literal. This is not filesystem glob syntax.
Can I escape a wildcard in wildcard mode?
No special wildcard escape syntax is supported. A backslash is literal and does not disable a following star or question mark. Use Literal mode when those characters must match themselves.
Does this test my regex?
No. The tool generates patterns and code without executing them. Use the related Regex Tester to test sample text and review runtime behavior.
Is case matching language specific?
The output uses JavaScript Unicode regex behavior with the u flag, plus i for case-insensitive matching. This is not locale-specific linguistic comparison.
What is the input limit?
Up to 20,000 input characters and 200 lines, each at most 1,000 characters. Spaces and empty pattern lines are meaningful. Regex constructor code is exported as text and is not run.
Help improve this tool
Report a problem or suggest an improvement
Describe the issue without pasting private tool input. Feedback goes to our admin inbox.
