6. Learn Regular Expressions
Regular expressions are something the UNIX world has used for many years. What are regular expressions (abbreviated as regex or regexp)?
Regex are similar to SQL queries. These tools enable you to search text in very novel and efficient ways. You can even react to your hits, possibly replacing text with uppercase to lowercase translations, substituted phrases, and so on.
One of the worst security issues that many applications have is trusting user input. Bad applications might pass input directly to the Server Side Include (with Exec) code. If so, expect hackers to embed a command into their return information.
So how do you quickly and efficiently sanitize this input? Regular expressions can strip out embedded command and HTML characters (which is the subject of a later article). Learn Regexp to improve your application’s security.