I have a piece of string:
'Dow<br> <span class="table-sub-header">Value</span>' I want to replace 'Value' inside the span with an arbitrary variable. I know that the span class will be there every time.
I've tried things like:
var s = 'Dow<br> <span class="table-sub-header">Value</span>'; And then doing a replace with something like this as the regex:
/<span class="table-sub-header">*</span>/ But it looks messy. Is there a clean way of doing this?
Edit: 'Value' in this case is arbitrary. I don't know what it is and I wanted a general method to replace what is in the span.