here is example of html
<html>
<head></head>
<body>
<p>complete guide</p>
<p>
At the moment, we have no <span>questions</span> regarding the model and <b>logic</b> of the application, so there are no highlighted questions in the presentation.
</p>
</body>
</html>
regexp: complete(([^s])s){0,24}questions|questions(([^s])s){0,24}complete
and expected result:
<html>
<head></head>
<body>
<p><mark>complete guide</mark></p>
<p>
<mark>At the moment, we have no</mark> <span><mark>questions</mark></span> regarding the model and <b>logic</b> of the application, so there are no highlighted questions in the presentation.
</p>
</body>
</html>
words inside regexp match also must be marked, and the dom tree must be valid.
how it can be done for example with jsoup?
New contributor
user3669137 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.