Tag: regular expression
Many situations we want to be able to detect if a post/comment is spam by checking to see if it contains a list of spam/forbidden words. The following provides …
Given a string e.g. “domain.com” we want to find out if it is a valid domain string name. We can do this in PHP via Regx aka Regular Expression. …
Let’s say we want to put a REL=NOFOLLOW on all external links in your wordpress posts/pages, we can add a filter to parse the content using the regular expression …
IP Addresses consist of two kinds. The IPv4 and IPv6. The IPv4 is 32-bit that contains 4 bytes. For example, X.Y.Z.U where four digits (0 to 255) are separated …
Linux BASH shell is powerful. The shell is a programming environment. You can do the regex match using Shell script. The =~ operator is similar to match() function. And …