Test, validate and match regular expressions
This regex matches common honorific salutations (Mr, Mrs, Ms, Miss, Dr, Rev, Er) at the start of a string, allowing optional leading whitespace and trailing spaces or periods after the title. With the global and multiline flags, it strips every leading title across multiple lines, making it ideal for cleaning name fields. Typical use cases include normalizing contact lists, preparing mailing labels, or preprocessing names for deduplication and record matching.