I have been searching a way to detect sentences in XHTML code avoiding to detect tags and including some code between them.
The best bet I guess is RegEx, I have seen some "tag detecting" regular expressions among a big bunch of examples and websites and can code some simple (really simple) expressions too.
But I can't really realize nor find any resource or clue among the Internet to my coding enigma so I though it would be worth asking this specific issue to the community.
Here it is an example (hope I would be clearer this way
Original code:
Code: Select all
<h1>Header</h1>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
<p>Aliquam <a href="orci">orci mauris</a>, faucibus a, ornare in, consequat at, ante. Duis lobortis nisi in velit.</p>Code: Select all
<h1><span title="begins with H">Header</span></h1>
<p><span title="begins with L">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</span></p>
<p><span title="begins with A">Aliquam <a href="orci">orci mauris</a>, faucibus a, ornare in, consequat at, ante. Duis lobortis nisi in velit.</span></p>Does that make sense? Should I give more examples/explanation?
Please feel free to ask more details or whatever.
Thanks and regards,
LuckyShot