How to use the Regex Explainer.
Explain the pattern in the correct regex flavor. Similar-looking syntax can behave differently across engines, especially for anchors and Unicode.
Make the workflow fit your task.
Read the pattern using the stated engine and flags, explaining each token's effect and how the parts combine. Demonstrate a matching and nonmatching input, including a boundary case where interpretation is easy to miss.
- What you provide
- Pattern and regex flavor.
- What you get
- Readable explanation of matches and edge cases.
See the input and the result.
Illustrative input and output · a teaching example, not a live WebAct run
Example input
JavaScript, no flags: ^[0-9]{4}$. Explain and test 2026, 026, 20A6 and 2026 followed by a newline.Completed example
^ anchors the start; [0-9] allows ASCII digits; {4} requires exactly four; $ anchors the end.
2026 → true
026 → false
20A6 → false
2026 followed by a newline → false
This pattern checks shape, not whether a value is a valid year.Load this input into the prompt, then copy it to WebAct to try the task. Your result may differ from the illustration.
Decisions and troubleshooting.
Can regex syntax be explained without knowing the flavor?
Some tokens are shared, but engine and flags can change behavior. Identify them before making claims about matching or support.
Why does the explanation disagree about line boundaries?
Check multiline mode and the engine's anchor semantics. Test an input containing a line break instead of relying on a generic description.
Reference for this workflow.
Try it with your own source.
Replace the example with your material in the task prompt. Keep the requirements you need, then copy the task into WebAct.
Customize and copy the task ↑