Tag Archives: RegEx

RegEx Example

Needed to replace

<p>Regulatory Taking:


<p><b>Regulatory Taking</b>:

where text between <p> and : were undetermined. The following RegEx find/replace in Notepad++ does the job:

Find: <p>(.+):

Replace: <p><b>$1</b>:

$1 is the ‘Backreference’ to (.+)

Using RegEx to replace HTML Tags

This regular expression matches the html italic begin and end tags as well as any text between them:

This regular expression will replace the found italic tags with beginning and end span tags of class ‘caseName’:
<span class=”caseName”>1</span>

The 1 represents the first group in the find expression (between the parenthesis), thus preserving the text between the tags. This may be unique to the regex in Notepad++. Other regex tools may use $1 instead.

Source: http://stackoverflow.com/questions/3218063/notepad-replace-problem