If you’re looking for an example of how to implement this using regex after enabling the “Watched words are regular expressions” setting under Admin → Settings → Posting, this topic has some more information:
For example, you could use the following to censor email addresses and xxx-xxxx phone numbers.:
“\d{3}-\d{4}|[\w+-.]+@[a-z\d-]+(.[a-z\d-]+)*.[a-z]+”
I hope this helps!