In a script I have a variable that is something like this…
The upper case letters in between the tags may be different from time to time but will always be a single, upper case character in the range A to Z.
I want to replace each letter in between the characters “>” and “<“ with a question mark character yieding this..
I have scoured JS regex tutorials but my tries don’t work. Help will be greatly appreciated.
JavaScript:
var = “our >A< found >B< and lost >R<“
I want to replace each letter in between the characters “>” and “<“ with a question mark character yieding this..
Code:
var = “our >?< found >?< and lost >?<“
I have scoured JS regex tutorials but my tries don’t work. Help will be greatly appreciated.
Last edited: