Runs locally in your browser. Sample text is not uploaded or saved. Searches one virtual text input, not local files or directories.

ASCII/C-locale subset: literals, dot, anchors, bracket/POSIX classes, groups, alternation, and greedy repetition. Basic mode uses escaped groups, intervals, and GNU \+ \? \| operators. Backreferences, Perl regex, shorthand/word-boundary escapes, locale-specific matching, binary inputs, and recursive file searching are not supported.

Count takes precedence over matching-text output and ignores context. With -o, context can still separate groups; with -v, matching context rows can print match fragments. With zero context, -v plus -o produces no text. Limits: 50,000 input characters, 5,000 lines, 5,000 characters per line, 256 pattern characters, context up to 50, and bounded execution/output.

grep simulation result

Choose a pattern and simulate to see selected lines.

No matches is a normal result, not a syntax error. This is a browser simulation of the documented subset, not GNU grep itself. Use the native command for Unicode, binary data, file traversal, or unsupported syntax.

Learn

grep Simulator Guide

About this tool

Simulate grep on one pasted ASCII text sample. Choose fixed strings, basic regex, or extended regex, with case-insensitive matching, line numbers, whole-word matching, inverted selection, context, selected-line counts, and matching-text output. No file paths, directory traversal, or remote requests are involved.

Questions

Is this a complete GNU grep implementation?
No. It uses a bounded local regex engine for a documented ASCII/C-locale subset, with leftmost-longest whole-match selection. Perl regex, backreferences, GNU shorthand/word-boundary escapes, locale-specific matching, binary inputs, and file searching are not implemented.
Does count show matching occurrences or matching lines?
It counts selected lines, like grep -c, not the number of individual matches. With invert enabled, it counts lines that do not match. Count takes precedence over matching-text output.
Why is there no output with invert and matching text only?
With zero context, invert selects non-matching lines, so there are no matching substrings to print. The summary can still report selected lines and a simulated successful exit status. With context enabled, matching context rows may print match fragments instead.
Is my text sent anywhere or stored?
The simulator processes the pasted sample in the browser without tool input storage or upload. Its output and source are separate. Copy output uses only the result, not the original sample.