Sed 101
|

Sed 101

SED aka stream editor is a utility app in linux / bsd systems (among others) which allows you to parse text in files based on simple regexp and change them based on its own set of rules. simple syntax for parsing and replacing text in a file called test.txt that contains the text I love…

php Filter var & common regex patterns
|

php Filter var & common regex patterns

People … quit messing about with ereg_replace / preg_replace / eregi or other things you know nothing of… use the php filter_var. DO IT. Commonly found bullshit on the interwebs : function isValidEmail($email){ return eregi(“^[_a-z0-9-]+(\.[_a-z0-9-]+)@[a-z0-9-]+(\.[a-z0-9-]+)(\.[a-z]{2,3})$”,$email); } eregi is deprecated and silly, the above WILL miss some of the weirder or longer email addresses like school/company…