void () { String s = """ <html> <body> <hr> <table> \t<tr> \t\t<td> \t\t<br> \t\t<table> \t\t\t<tr> \t\t\t\t<td><nobr>Ctrl + <b>W</nobr></b></td> \t\t\t</tr> \t\t</table><br> \t\t<br> \t\t<table> \t\t\t<tr> \t\t\t\t<td><b><nobr>Ctrl + Numpad/</b></nobr></td> \t\t\t</tr><tr> \t\t\t\t<td><b><nobr>Ctrl + Numpad+</b></nobr></td> \t\t\t</tr> \t\t</table><br> \t\t<br>\t\t \t\t<br> \t\t</td> \t</tr> </table> <hr> </body> </html>"""; int markerPos; String s1; String s2; String marker = "</b>"; String marker2 = "</nobr>"; markerPos = s.indexOf(marker); s1 = s.substring(0,markerPos); s2 = s.substring(markerPos); prepareFile(s1,s2); remove(marker.length()); markerPos = s.indexOf(marker2) + marker2.length(); s1 = s.substring(0,markerPos); s2 = s.substring(markerPos); prepareFile(s1,s2); remove(marker2.length()); moveEditPointRight(marker.length()); insert(marker2); markerPos = s.indexOf(marker,markerPos+marker2.length()) + marker.length(); setEditPoint(markerPos); remove(marker.length()); moveEditPointRight(marker2.length()); insert(marker); markerPos = s.indexOf(marker,markerPos+marker2.length()) + marker.length(); setEditPoint(markerPos); remove(marker.length()); moveEditPointRight(marker2.length()); insert(marker); String NewMarker = "A-A"; s = "<html><body><p id=1>AAAAA" + NewMarker + "<p id=3>BBBB</body></html>"; markerPos = s.indexOf(NewMarker) + NewMarker.length(); prepareFile(s.substring(0,markerPos),s.substring(markerPos)); insert("<p id=2>ZZZZ"); }