I am using regex to remove html tags from my string
Air Receiver <br /> Pressure Washer <br />Vehicle Lift<br />100T Crane Attachment<br />
which is working well.
ViewBag.PlantDetails =
Regex.Replace(QuoteDetails.PlantDetails, @"<[^>]+>| ", " ").Trim();
which returns the following string -
Air Receiver Pressure Washer Vehicle Lift 100T Crane Attachment
My question is, is there a way to add a new line to the string so that it shows like below?
Air Receiver
Pressure Washer
Vehicle Lift
100T Crane Attachment
` will be the only tag you encounter here. If it's html, use html tools. – Fildor Jul 27 '22 at 15:27