Ok I tested on your example, hopefully it works on others:
Search:
Code:
<div id="([^"]+)">\s*<p([^>]+)><a href="([^"]+)"([^>]+)>(.*)</div>
Replace:
Code:
<div id="\1"><p\2><a href="\3"\4>\5<p\2><a href="\3">Return to Text</a></p></div>
NOTE: I had a whole color coordinated post to try to explain it more in depth, but there were too many capture points and I thought it would be a little confusing. If you need a more in depth explanation, I would not mind breaking it down for you.
As a side note, I personally think that a "Return to Text" link is a little hideous (the original footnote should point right back to where you came from).
Quote:
Originally Posted by mzmm
there's probably an option to turn on 'dot matches new line' in the search/replace field which you should use. might have to play around with it to get it working properly but hope it's helpful
|
Yes, put a checkbox in "dot matches newline", that will allow the
red part to capture everything until the </div>.