S
sks
I'm having trouble working out how to use a reg ex to replace certain
characters inside a string which contains some html.
String string = "<table>zmzmz<tr><td>Hello</td></tr></table>";
I want to replace the z's inside the <table> and <tr> tags with y's to get
<table>ymymy<tr>.... etc.
I can create my pattern,
Pattern pattern = Pattern.compile("<table>[(.*?z.*?)]{0,}<tr>");
get my matcher, but there doesn't seem to be a replace(int group, String
replacement) method or similar. Anyone help ?
characters inside a string which contains some html.
String string = "<table>zmzmz<tr><td>Hello</td></tr></table>";
I want to replace the z's inside the <table> and <tr> tags with y's to get
<table>ymymy<tr>.... etc.
I can create my pattern,
Pattern pattern = Pattern.compile("<table>[(.*?z.*?)]{0,}<tr>");
get my matcher, but there doesn't seem to be a replace(int group, String
replacement) method or similar. Anyone help ?