Note to myself: Useful Regular Expressions

Find all opening and closing font tags with any given attribute to replace them with nothing:

regular expression search and replace screenshot

This looks for a “<” followed by zero or one “/” followed by the string “font” followed by zero or any character followed by a “>”. This means you shouldn’t have “<” or “>” in your attributes.

If you need to find all files that contain these font tags you can use the following command in the directory containing the suspected files:

grep "<font>" * | cut -d':' -f 1 | sort | uniq

Lovely.

Leave a Reply

Your email address will not be published. Required fields are marked *