I have input text that can be long HTML text with tags and so on. Example of input can be something like:
<p>Lorem ipsum dolor sit amet, <strong>consectetur</strong> adipiscing elit.<p>
<p>%image1%</p>
<h2>Lorem ipsum</h2>
<p>Cum sociis natoque penatibus et magnis dis parturient montes.</p>
<p>%image2%</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p>
<p>%image3%</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p>
...
What would be the easiest way of finding all occurrences of text between %% characters and replacing that with <img src="image1.jpg">?
The current trend is 10% in comparison to 5% last year. %graph1%(Either don't allow a space after % or prepare for some trouble with<img src=" in comparison to 5.jpg">%image1%to users who will use this? Should I use#iamge1#or something else instead?