Quote:
Originally Posted by bfollowell
I think what I need then is a regex expression that will let me find:
<p class="para c2">“Ignore whatever characters may be in this paragraph.”</p>
and replace it with:
<p class="para"><span class="italic">“Ignore whatever characters may be in this paragraph.”</span></p>
Any suggestions? I'm OK with extremely basic regex but I get lost when trying to build larger expressions that will look for something specific with some random text in the middle and then allow me to replace the exact portion of random text as is.
- Byron
|
that is easy
find
<p class="para c2">(.*)</p>
replace
<p class="para"><span class="italic">\1</span></p>
but having span in the replace is superfluous
so
replace
<p class="para" "italic">\1 </p>
is neater
PS so in fact why bother - just define class c2 to mean italic & you are done!