Enter the pattern and flags separately
Enter the expression without surrounding slashes and put flags such as g, i, and m in the flag field. They control global matching, case sensitivity, and multiline boundaries.
Build complex expressions in smaller steps; invalid syntax and duplicate flags produce errors.
- g: find all matches
- i: ignore case
- m: multiline mode
Date pattern and capture example
`(\d{4})-(\d{2})-(\d{2})` divides 2026-09-02 into year, month, and day groups.
A replacement of `$1/$2/$3` previews the value as 2026/09/02.
- Parentheses: capture group
- $1 and $2: reuse captured values
- ^ and $: string boundaries
Test both success and failure cases
Valid samples alone can hide an overly broad expression. Include empty values, wrong separators, extra surrounding characters, and long inputs.
Inspect positions and the capped list of 100 matches to detect unintended repetition.
Mind language differences and performance
Baro Tool follows browser JavaScript RegExp syntax. Java, Python, and database engines can differ in features and replacement notation.
Escape dynamic user input and review catastrophic backtracking and ReDoS risk before production use.