PHP RegEx
PHP includes function to work effectivly with strings by using regular expressions, this category is dedicated to documenting the use of these functions.
- Validating user-input is one of the most important ways to increase security and prevent hacks; in this article, I will show how to easily validate GET and POST parameters, and prevent your app from being abused to send spam.
- How to optimize image-loading and automatically include width and height attributes on img elements with PHP.
- Backslashes in replacement string seem to disappear when the replacement is done using preg_replace
- Backslash needs to be tediously excaped in PHP, both when uccuring inside your PHP script, and when used with preg_replace.
- Tutorial on how to replace parts of a string with str_replace and regular expressions.