I am trying to replace street with st only if street isn't followed by any alphabet. Replacement is allowed if after street EITHER there is non-alphabet character OR end of string.
I am trying to achieve this in Postgresql 9.5 regex_replace function. Sample query i wrote:
select regexp_replace('super streetcom','street(?!=[a-z])','st');
street here shouldn't have been replaced by st since street is followed by 'c'. So the expected output is 'super streetcom' but the output i am getting is 'super stcom'.
Any help for why i am getting the unexpected output and what can be the right way to achieve the intended result.

(?!=pattern)is the correct negative lookahead syntax in postgresql? Usualy it is just(?!pattern)