Been trying to solve this for a while now.
I need a regex to strip the newlines, tabs and spaces between the html tags demonstrated in the example below:
Source:
<html>
<head>
<title>
Some title
</title>
</head>
</html>
Wanted result:
<html><head><title>Some title</title></head></html>
The trimming of the whitespaces before the “Some title” is optional.
I’d be grateful for any help
s/\s*(<[^>]+>)\s*/\1/gsor, in c#:
Regex.Replace(html, "\s*(<[^>]+>)\s*", "$1", RegexOptions.SingleLine);