I am writing personal information filter. When it encounters VALID phone or email replaces it with "[PRIVATE]";

Valid phone is for example '0123 45678' and '00123 45678' is invalid, but i get 0[PRIVATE] for the second one after the filtering. How do i look only at entire words using regex and `\bword\b` is totally not working properly.