How to use replace function to replace word
I am trying to write a replace function in which I replace CA with California in an address string.
I am trying to avoid using regular expression and just use other functions like replace, instr, trim etc.
But what my main confusion is how do i take care of three cases in which.
CA can be present with spaces before and after it like.
- Redwood City, CA 96403
CA can be present with spaces only before it and after it the string ends.
- Redwood City, CA
and I do not want to replace any other CA in the string that is part of other word
- Blaca Street CA
( for example do not replace ca in Blaca)
or
- Cardinal Dr CA
Thanks