I need a regex which will match whitespace chars under some condition. Let's say I have this string:
String s = "{ <class body declarations> }";
I want to apply Java replaceAll method only on the whitespaces between the two delimiters <
and >
, to obtain this string:
"{ <classbodydeclarations> }";
Is there a regex to do that?