Entries tagged with regular-expressions
13
Remove profanity (or any words) with a regular expression
0 Comments | Tags: python regular-expressions snippets
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.
05
BBCode and Syntax Highlighting with Django
0 Comments | Tags: django bbcode regular-expressions syntax-highlighting
Lightweight BBCode parser and syntax highlighting for Django. Code blocks set off with the tag will be automatically highlighted.
PHP function to decode keywords used by search engines. Determine what search keywords drive traffic to your site.
03
BBCode, Syntax Highlighting and more
0 Comments | Tags: php source-code blog bbcode regular-expressions
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!
01
Regular Expression Replace in All Files and Subdirs
0 Comments | Tags: php source-code regular-expressions
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.
