L
laredotornado
Hi,
I have a span that contains text of the form
var spanHtml = "My Tab Content (7)";
The content is guaranteed to end with a string of the form "(#)" where
"#" is a whole number. My question is, how would I write a regular
expression that would change the value of #, given another number?
For example, given the above variable, if I had
var newNumber = 15;
I would want the variable spanHtml to contain
"My Tab Content (15)".
Thanks, - Dave
I have a span that contains text of the form
var spanHtml = "My Tab Content (7)";
The content is guaranteed to end with a string of the form "(#)" where
"#" is a whole number. My question is, how would I write a regular
expression that would change the value of #, given another number?
For example, given the above variable, if I had
var newNumber = 15;
I would want the variable spanHtml to contain
"My Tab Content (15)".
Thanks, - Dave