I need to limit the APO FPO address for the city. I did this using this regex
var regExp : RegExp = new RegExp('^[af][ .]?p[ .]?o|[P|p]*(OST|ost)*\.*\s*[O|o|0]*(ffice|FFICE)*\.*\s*[B|b][O|o|0][X|x]','i');
It works only when there is a pattern APO, FPO, A.p.o, F.P.O, etc., but it is still the same with the city APOPKO, which should not happen.
I tried to give \bafter [af][ .]?p[ .]?o, but did not work for me. Can anyone help with this
Thanks in advance.
source
share