tried to implement preg_replace_callback() in a way that doesn't make tweetnest incompatible with PHP versions lower than 5.3