I have code to normalize a POB address. For example, one of the normalizations included is:
set @string = replace(@string, 'pobox', 'pob')
Now I want to do something similar: I want to find any POB that is directly followed by a number (without a space in between) and insert a space. I want to find the pattern like POB[0-9]
and then replace the "POB" with "POB ". How can I accomplish this? Can it be done with a simple replace? Or do I need to use some other function, like PATINDEX
?