About Text Grep
Works like the Unix grep command — filter lines of text by a pattern. Supports plain text and full JavaScript regular expressions. Use "Invert" to exclude matching lines instead. Runs entirely in your browser.
grep in your browser. Supports regex.
Works like the Unix grep command — filter lines of text by a pattern. Supports plain text and full JavaScript regular expressions. Use "Invert" to exclude matching lines instead. Runs entirely in your browser.
Paste your input, type a search pattern, and choose whether to keep or exclude matching lines. The tool splits the input on newlines and runs each line through either a literal substring check or a JavaScript RegExp. Toggle the 'regex' switch to interpret the pattern as a regular expression instead of a literal string.
JavaScript regex is close to PCRE but not identical — lookbehind is supported in modern browsers, but possessive quantifiers and recursive patterns are not. Case-insensitive matching uses the i flag. The match-count line tells you how many lines were kept versus filtered out, which is handy when grepping a large log dump for error keywords.
JavaScript RegExp — close to PCRE. Lookbehind, named groups and Unicode property escapes work in modern browsers. Possessive quantifiers and recursive patterns are not supported.
Switch to 'Exclude matching' mode — equivalent to grep -v. The output will contain every line that did not match your pattern.
Patterns are applied per line, so ^ and $ anchor to the start and end of each line by default. To match across lines, you'd need to disable the line-split — currently this tool always splits on newlines.
No — matching is case-sensitive unless you toggle the 'ignore case' option, which adds the i regex flag.
Explore the full suite of TEXT tools and 290+ other free utilities at Chunky Munster.