Replace text that contains a 4 digit number

I need to replace text that will be a value of 1000 to 9999 (a 4 digit number, as a string)

Is there any way of doing this without making thousands of if statements.

Thanks

Do you mean you need to replace, say, the number 1234 with the STRING “1234”?

Well, this is what i thought the issue was but it is actually html tags. I am working with wordpress api, and there are html tags. i have just encountered another issue. basically i need to make replace text blocks that have the most common html tags such as

’ " […] and so on.

Running into more problems as well.

Join the number to an empty text variable .