Related Content
PHP Live Regex
When creating regular expressions for PHP I tend to use the awesome tool PHP Live Regex.
Convert HTML To ASCII With PHP
The reverse of turning ASCII text into HTML is to convert HTML into ASCII. And to this end here is a little function that does this.
Common Regular Expressions
Here are some of the regular expressions that I frequently use.
Find a blank line
^$
Spaces
[ \t]+
You can use this to break a text string apart into words.
Date
RegExLib.com: The Regular Expression Library
Writing regular expressions can sometimes be a real pain, especially if you are not used to them. Rather than trying for yourself to make a regular expression you might want to think about looking for regular expressions that other people have made.
reWork: A Regular Expression Workbench
Regular expressions are a very useful tool for any programmer wanting to validate input, format strings, change words, reformat data or even split apart a string into an array.
Add new comment