void () { String in = "<input class=\"other\" placeholder=\"Some placeholder\">"; String what = "<input 'a:[regex( placeholder )]>"; String by = ""; String expected = "<input class=\"other\">"; assertEquals(expected, replace(in, what, by)); String in2 = "<img src=\"foobar.jpg\" alt=\"alt\" width=\"108\" height=\"71\" style=\"display:block\" >"; String what2 = "<img alt '_other*>"; String by2 = "<img $other$>"; assertEquals("<img src=\"foobar.jpg\" width=\"108\" height=\"71\" style=\"display:block\">", replace(in2, what2, by2)); }