I have a function doit() that transforms text that way:
I like berries -> I LikE BerrieS.
And I need it to work with html-text to.
How can I transform text only between html tags? Don't touch tag name and all tag attributes. E.g. I need:
<p class="super green" style="height: auto">I LikE BerrieS</p>
but not:
<P ClasS="SupeR GreeN" StylE="HeighT: AutO">I LikE BerrieS</P>
I've tried simple preg_replace() patterns, but nothing worked. I'm new to regexp and need help.
May be preg_match() would be better?
Any suggestions? It would be nice to provide working php-code.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…