Online tool to remove all lines of a text matching a regular expression.Insert your text (for instance the content of a cvs file ) and specify a regular expression. All lines matching (or not matching) the regular expression will not reported in the final text.
Click this
link to get a complete guide about the regular expressions you can define.
Special characters in regular expression:
. | Any character |
\d | A digit: [0-9] |
\D | A non-digit.The same of [^0-9] |
\s | A whitespace character. |
\S | A non-whitespace character.The same of [^\s] |
\w | A word character..The same of [a-zA-Z_0-9] |
\W | A non-word character. The same of [^\w] |
.+ | any string of characters (e.g.:r2e3r4t3[2) |
[0-9]+ | any string of digit (e.g.:23432) |
Example of regular expression:
Regular Expression | Sample of a line matching the expression | Description |
---|
^(ABC).* | ABC and CDE | Lines lines starting with 'ABC' (^ mean line start) |
.*(ABC)$ | it and ABC | Lines ending with 'ABC' ($ mean line end) |
.*(ABC )+.* | and me ABC ABC and | Lines having 'ABC' repeated one or more times |
^[abc].* | another day | Lines starting with character a, b, or c |
^[^abc].* | game is over | Lines starting with any character except a, b, or c |
.*[a-zA-Z][0-9][0-2].* | my name is a03gray | Lines belong of a string 'any letter' 'any digit' 'digit between 0 and 2' |