How to Use the Grep Lines Online with a Regex Pattern
- 1Paste the text to search with one candidate line per row.
- 2Enter the pattern in Regex Pattern and put any flags in their separate field.
- 3Enable Invert Match when you want to exclude the lines that satisfy the pattern.
- 4Review the returned lines and correct the pattern if the tool reports a syntax error.
Input & Output Examples
Use a backslash before the dot, a dollar sign for the end, and i for case-insensitive matching.
Input Sample
cover.PNG
notes.txt
map.pngExpected Output
cover.PNG
map.pngWith inversion on, the pattern anchored at both ends excludes lines containing digits only.
Input Sample
42
007
row 8Expected Output
row 8Practical Developer Workflows
- Select filenames ending in a chosen extension from a plain-text list.
- Keep only records that begin with a specific label while retaining their full contents.
- Exclude rows made entirely of digits from a mixed text fixture.
Zero Server Uploads & Complete Privacy
Runs 100% in your browser; no data is uploaded to any server.
Notice a bug, calculation error, or outdated info?
Let us know directly so our engineering team can fix it.
Frequently Asked Questions
Enter the pattern itself and put flags such as i in the separate field. For example, use a backslash before the dot in a filename extension. Wrapping the pattern in slashes would make those slashes part of the search.