I have the following code. I would like to replace all occurrences of ~23 between the starting word <pre> and ending word </pre> by the word 63. I tried the below code, but it does no replacement. I should be getting the following string after replacement : <div>dds ~23 ssd</div><pre>sdddsds 63 mike</pre>
What is the main change compared to the original regex? Just that spaces and other caracters bw the tags will still match, and they won’t be part of the replaced text because it’s within a lookahead.