how can I replace the following text in python/javascript
Latency=45.466<span class="interval"> ± 11.462</span>;pass
in a way that it can show final text like this:
Latency=45.466±11.462;pass
how can I replace the following text in python/javascript
Latency=45.466<span class="interval"> ± 11.462</span>;pass
in a way that it can show final text like this:
Latency=45.466±11.462;pass
You just have to remove the html
tags, for that, you can use:
import re
subject = 'Latency=45.466<span class="interval"> ± 11.462</span>;pass'
result = re.sub("<[^>]+>| ", "", subject)
print result
# Latency=45.466±11.462;pass
For JavaScript you can use:
subject = 'Latency=45.466<span class="interval"> ± 11.462</span>;pass'
result = subject.replace(/<[^>]+>| /g, "");
console.log(result);