I followed some discussions in StackOverflow to get help to resolve my issue specific to Dart. I used the regex command to remove the place between the closing and opening tags in HTML. But it did not work for me.
Code
import 'dart:html';
void main() {
var result = '<div><div><ul> <li>Chair</li> <li>Table</li> <li>Fan</li></ul><div></div>'.replaceAll(RegExp(r'/>\s+</gim'), '><');
print(result);
}
Actual Result
<div><div><ul> <li>Chair</li> <li>Table</li> <li>Fan</li></ul><div></div>
Expected Result
<div><div><ul><li>Chair</li><li>Table</li><li>Fan</li></ul><div></div>
I would like to know what type of change I need to do in my regex to get the expected result.
Thanks, in advance.
>Solution :
Change to:
.replaceAll(RegExp(r'>\s+<'), '><')