What it does
A backslash makes a special character literal: \. matches a dot. Source code strings add their own escaping layer.
How to use it
- Load the example.
- Paste the JSON string "\\." into the regex box and accept the conversion to see the decoded pattern.
- Check the counterexample.
Verified example
Example
Text "a.b"
\. Result: "."
\. Result: "."
\. Result: "."
\. Result: "."
Counterexample
Text "abc"
\. Result: no match
\. Result: no match
\. Result: no match
\. Result: no match
Recorded by running fixture FX-S08 on : rp.js@1 on Node v24.21.0 (V8), v24.21.0, CPython 3.14.2 (Pyodide 314.0.7), PCRE2 10.48, go1.27.1. JavaScript results come from the rp.js@1 core on Node’s V8; your browser runs the same core.
Engines
- The escape \. means a literal dot in all four engines.
Limits
- Decode the string first, then compile the regex; the tool never evaluates code to do this.