I have a block of text that I need to modify by replacing BR tags with \n in order to create new lines.
D:\HP\ConfigurationServer_3464\log\nvdmr***.log ~ File not
found<br>D:\HP\DCSSchedulerAgent_3478\logs\HTTPD-DCSSchedulerAgent-3478.log ~
File not found<br>D:\HP\MonitorClient\logs\windowsService.log ~ File not
found<br>D:\HP\PolicyServer_3467\logs\httpd-policyserver-3467.log ~ File not
found<br>D:\HP\ProxyServer_3466\logs\httpd-proxyserver-3466.log ~ File not
found<br>D:\HP\MessagingServer_3461\logs\rms.log ~ file not found<br>
I've tried the following script, but it doesn't seem to be replacing the content as expected. Can you help me identify what I'm doing wrong?
this.downloadData.forEach(x => x.ServiceLogStatus = x.ServiceLogStatus.replace(/<br\s*\/?>/mg, '\n'));
Take a look at the data below:
CPUStatus: "1"
Connectivity: "Success"
DiskStatus: "Free Space C: 64.86%↵D: 68.6%↵E: 0%↵F: 0.01%↵G: 56.83%↵H: 80.78%↵I: 80.28%"
HostName: "gtdctiholdb01u"
LastRebootStatus: null
LogTime: "5/15/2019 11:26:01 AM"
MemoryStatus: "Memory Used: 89.86%"
RDPStatus: "05/11/2019 16:50:13"
ServiceLogStatus: " D:\HP\ConfigurationServer_3464\log\nvdmr***.log ~ File not found<br>D:\HP\DCSSchedulerAgent_3478\logs\HTTPD-DCSSchedulerAgent-3478.log ~ File not found<br>D:\HP\MonitorClient\logs\windowsService.log ~ File not found<br>D:\HP\PolicyServer_3467\logs\httpd-policyserver-3467.log ~ File not found<br>D:\HP\ProxyServer_3466\logs\httpd-proxyserver-3466.log ~ File not found<br>D:\HP\MessagingServer_3461\logs\rms.log ~ file not found<br>"
ServiceStatus: ""
SupportDL: ""