Just when you thought the mainstream media couldn’t get more convoluted and controlled, on April 14th, 2008, the Associated Press announced their new members for their board of directors. The Associated Press is the last remaining nationally oriented news service in the United States. It is a service that can reproduce stories that are published… Read more »
Posts By: David Drake
PHP and Regex – Replacing Repeating Characters with Single Characters in a String
[Update] – a comment left by TLP gives a much better solution to the problem that seems to be better in benchmarks as well. I’m changing the post to reflect the best and fastest method for the situation described. In a previous post, I described a situation where we needed to remove a repeating dot… Read more »
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 »