Find and Replace with Regex

In order to copy text that matches part of a regular expression you have to mark the part that you want to be able to copy. You do this with a capture group, marking the text with a pair of parentheses.

Example:

Find: ([A-Z][0-9]{2,3})  

Once you have a capture group you can insert its contents into the replacement text with $n, where n is the number of the capture group.

Example:

Find: ([A-Z][0-9]{2,3})  
Replace: '$1',  

This will replace all words that start with a capital letter and followed by 2-3 number with the quoted text and a trailing comma.
Example:

Original: P237  
Replacement: 'P237',