I have text like
String str = "<x>abc</x>";
and want to match against
<x>
abc
</x>
i tried to do something like:
str = str.replaceAll(">",">\\\\w*");
str = str.replaceAll("<","\\\\w*<");
Pattern pattern = Pattern.compile(str);
how the value of str in the compile is actually
\w*<x>\w*abc\w*</x>\w*
i was expecting
\\w*<x>\\w*abc\\w*</x>\\w*