S
skajotde
Hi all
I'd like extraxt <br> before span.
example:
<span style="text-decoration: underline;"><span style="text-decoration:
underline;">ff<br>ff</span></span>
to:
<span style="text-decoration: underline;"><span style="text-decoration:
underline;">ff</span></span><br><span style="text-decoration:
underline;"><span style="text-decoration: underline;">ff</span></span>
* br outside of span
Pattern spanBR =
Pattern.compile("(<span[^>]*?>).*?(</span){0}.*?(<newline/>).*?(<span){0}.*?(</span>)",
Pattern.DOTALL | Pattern.CASE_INSENSITIVE);
Matcher matcherSpanBR = spanBR.matcher(html);
while (matcherSpanBR.matches()) {
html = matcherSpanBR.replaceAll("$1$2$5$1$3$1$4$5");
}
My question is how say "part of text without </span> between <span and
<newline/> and save this part text to register" (<newline/> is my br
aftter first conversion).
Cheers
Kamil
I'd like extraxt <br> before span.
example:
<span style="text-decoration: underline;"><span style="text-decoration:
underline;">ff<br>ff</span></span>
to:
<span style="text-decoration: underline;"><span style="text-decoration:
underline;">ff</span></span><br><span style="text-decoration:
underline;"><span style="text-decoration: underline;">ff</span></span>
* br outside of span
Pattern spanBR =
Pattern.compile("(<span[^>]*?>).*?(</span){0}.*?(<newline/>).*?(<span){0}.*?(</span>)",
Pattern.DOTALL | Pattern.CASE_INSENSITIVE);
Matcher matcherSpanBR = spanBR.matcher(html);
while (matcherSpanBR.matches()) {
html = matcherSpanBR.replaceAll("$1$2$5$1$3$1$4$5");
}
My question is how say "part of text without </span> between <span and
<newline/> and save this part text to register" (<newline/> is my br
aftter first conversion).
Cheers
Kamil