Regular expression - Notepad++

Click Ctrl+H and we get menu Replace as you see on the picture below.

To replace text with regular expressions, they should be selected (pictured in red rectangle), otherwise it will be replaced literally as a simple text.

Also mark check box Wrap around so you may make replacements everywhere in the document or documents.

Example

Let's say there's a lot of Bible references in the text:
Mat 3:16, Exo 30:12 ...

We may replace them as you see in the picture:
(\w+) (\d+)(\d+) replace to <a href='\1 \2:\3'>\1 \2:\3</a>

As a result all Bible references will will become links:
<a href='Mat 3:16'>Mat 3:16</a>, <a href='Exo 30:12'>Exo 30:12</a>.

Then replace all <a href='Mat to <a href='B:470 etc.

Examples

data: \d{2,4}-\d{2}-\d{2} – 2-4 digits, sign -, two digits, sign -, two digits

^\d{2,}\s*$ – will find all lines with at least 2 digits.

(\w+) (\w+) (\w+) (\d+-\d+-\d+)

Replace to \4 \1 \3 – the fourth group, then the first and third (date, name, surname)

Can be rewritten better
(\w+) (\w+) (\w+) (\d{4}-\d{2}-\d{2})
All the same, but clearly stated that the figures will be 4-2-2

Find all emails in the text:
[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}

  • one or more letter A to Z, figures, additional symbols,
  • AT,
  • again one or more letter A to Z, figures, additional symbols,
  • dot,
  • 2-4 symbols from A to Z