PHP and Regex – How to Replace or Remove a Repeating Character


While at work I came to an interesting conundrum when trying to validate/clean user names for the application I work on. Here is a description of the restrictions we put on our user names: “ID may consists of A-Z, a-z, 0-9, underscores, and a single dot (.).” While the project development staff is extremely talented,… Read more »