I need to replace Strings like '1956678~26789~7230' and '1956678~26789' in
https://baseurl/api/something/1956678~26789~7230/client/1956678~26789
with say like X. so it will be like
https://baseurl/api/something/X/client/X. I was using the replace
function, but I am not able to find the regex that I can use to replace the desired characters with X
So I want to use patindex to find position of following String in a given string. what is sql server regex version that can match all of the following strings: 1956678~26789~7230, 9889~454~234234~9089, 1~1~234. Eventually, I will use the substring and replace function to replace all of the above string with symbol X.