View Single Post
Old 05-18-2013, 05:45 AM   #1
kakkalla
Zealot
kakkalla doesn't litterkakkalla doesn't litter
 
kakkalla's Avatar
 
Posts: 146
Karma: 194
Join Date: Jun 2010
Location: Melbourne
Device: iPad
Regex to search at beginning of line

HI all.

I search for this type of code:
Code:
<p class="list1"><span class="list1">2.</span>Mathematics disorder (315.1)</p>
In the Find panel, I have:
Code:
<p class="(list.+)"><span class="(list.*)">(.+)</span>(.+)</p>
and the replace field I have:
Code:
<div class="\1"><p class="\1"><span class="\1">\3</span></p><p class="\1">\4</p></div>
As a test, I went back before the first replacement and ran the "find" again. It found the same paragraph inside the div tag, which is not what I want.

I tried using the "^" in front of my search string, but this didn't stop it from finding the same p tag inside the div tag.

Any ideas? Thanks in advance.
kakkalla is offline   Reply With Quote