Tag regex

Email Robot Handing DNS Updates

I know we’ve all been there. Staring at the endless stream of new emails wondering, “Can I automate this somehow?”. Trust me, I know. That answer is always yes, it can be automated. However, the real question is whether it…

Removing Cloudfront URLs with Regex

Recently helped a customer remove Cloudfront URLs as part of a migration process from AWS to Kinsta. Kinsta’s CDN is powered by Cloudflare and is built-in. There is no need for URLs to reference a CDN-specific location. So restoring all…

Safely Remove Dates from WordPress Permalinks

I’m not sure if this is a growing trend, but I recently decided to drop the dates from my blog post URLs. Previously I was using the day and name format /2017/12/12/identifying-bottleneck-plugins/ to the post name format This was not…

Querying ACF Relationship Fields using REGEXP

Advanced Custom Fields relationships are pretty amazing. You can easily manage relationships between virtually anything. The official ACF docs on querying relationship fields is a fantastic walkthrough showing how to handle the front-end display of basic relationships. It works by using…

Cleanup with WP-CLI and Regex

Recently one of my customer’s WordPress sites was filled with random hidden span tags containing a single word: “Save.” The source is a mystery, however I suspect it came from bad code rather then something malicious. It was showing up…

Regex with WordPress Database Backups

For too long, regular expressions or regex have been mysterious to me. With the help of the fantastic video series at Laracasts the quirky pattern matching syntax has started to make sense. The following are some experiments with pattern matching on…