Abacre Home > Advanced Find and Replace Home

Regular expressions FAQ

How can I remove a line with given string?

For instance you have the following text:


So how can we remove all lines containing aaa text?

Please use Batch replace operation and enable "Use regular expressions".

In Search for field put:

Search for:

Replace with field should be empty.

If you want to remove all lines only starting with aaa, you need to put ^ before the expression.

Search for:

Note, that \r\n is normal sequence for return and new line. For Unix or Linux files it could be just \r or \n

See also: syntax of regular expressions, regular expression builder