I have the following text
<msgText>H3ll0World</msgText><msgText>HelloWorld</msgText><otherTagWithNumbers>456</otherTagWithNumbers>
I need to retrive only the numbers ( [\d]
) inside the tag <msgText>
in order to replace them. In this case the regex would return 3 and 0.
What I have so far:
(<msgText>)([\s\S]*?)(<\/msgText>)
Here I have an example of this situation.