Wildcard to Regex
Convert wildcard patterns with * and ? to regular expressions.
Convert shell-style wildcard patterns into regular expressions: * matches any characters and ? matches one character, so *.log becomes ^.*\.log$. Every other character, including brackets, is escaped so it matches literally. Choose whether to match the whole string, and output either the pattern or a /pattern/ literal with an optional case-insensitive flag.
Need the reverse? Regex to Wildcard
Common use cases
- Turn a file glob into a regex for code or a log filter
- Convert user-friendly search patterns into regex
- Write filter rules for tools that only accept regex
How to use
- Type wildcard patterns, one per line.
- Choose anchoring and output format.
- Copy the regex.
FAQ
Does it support ** for folders?
No. ** is a globbing extension for nested folders; here * matches any characters, including slashes.
Can I go back?
The regex to wildcard tool converts simple regular expressions back into wildcards.
Related tools
- Regex to WildcardConvert simple regular expressions back to wildcard patterns.
- Regex TesterTest and debug regular expressions with real-time match highlighting.
- Regex EscapeEscape special regex characters for literal string matching.
- Lorem Ipsum GeneratorGenerate placeholder Lorem Ipsum text for design and development.
- Tweet Length CheckerCheck if your text fits within Twitter's 280 character limit.
- CRC32 Hash GeneratorGenerate CRC32 checksums for quick data integrity checks.