Entries tagged with "regular-expressions"

Remove profanity (or any words) with a regular expression

If you have comments on your site, or allow use generated content to appear in prominent places, it's a good idea to remove profanity. This regular expression matches case-insensitive for any bad words, and strips the entire word to the leading and trailing whitespace.

BBCode and Syntax Highlighting with Django

Lightweight BBCode parser and syntax highlighting for Django. Code blocks set off with the tag will be automatically highlighted.

Decoding keywords used in search engines

PHP function to decode keywords used by search engines. Determine what search keywords drive traffic to your site.

BBCode, Syntax Highlighting and more

Add BBCode support and Syntax highlighting using PHP. To make the blog even easier to use, I thought I'd get away from using HTML in my entries altogether. I also wanted a way to easily paste code and have it highlighted. Works on nested tags!

Regular Expression Replace in All Files and Subdirs

Recursively search and replace in files using this PHP script. Follows subdirectories and uses regular expressions for search and replace. Allows file extensions to be specified.