void () { String in = "<input id=\"one\" class=\"no\">"; String what = "<'_tag '_attr:[regex( id )]=\\''value\\'>"; String by = "\"two\""; String expected = "<input id=\"two\" class=\"no\">"; assertEquals(expected, replace(in, what, by)); }