Archive for August, 2010
preg (regular expression) to get emails in php
by z3n on Aug.28, 2010, under Coding
Problem:
A regular experssion pattern for getting emails on a random string.
Solution:
preg_match_all(
"/[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}/i",
$string,
$matches,
PREG_PATTERN_ORDER
);
.htaccess to redirect root to folder
by z3n on Aug.04, 2010, under Coding, Tips & Hints
Problem:
How to do a 302/permanent SEO compliant redirect from a root folder to somewhere else?
Solution:
RedirectMatch permanent ^/$ http://mydomain.com/php/index.php
Source: