I am replacing strings ina string, using regexs. I would like to match e.g. 2: when it stands alone (a 2: U) but not when up against another string (a 2:A). Additionally, it should also work when the 2: is at the end of the string. Here is what I tried:
but \s doesn't work at the end of a string. Word boundary \b doesn't work for the ":", what is the best way to do this?