Hello.
I have a string which contains a nonvariable part, a variable numnber and another nonvariable part. I want to user replace(), to change only the variable part into a value a user chooses.
I'm a noob at javascript, and even a bigger noob in reg expressions, so sorry if this is something trivial.
Anyway, i have a string like this:
"first nonvar part: "+any_integer+"last nonvar part".
i'd like to use regexp to replace any_integer.
Can i somehow combine string and regular expression matching to match the string by it's non variably parts with an unknown number in between?
So i can use:
replace("first nonvar part: "+any_number+"last nonvar part","first nonvar part: "+user_input+"last nonvar part")
or something similar.
Many thanks