public static function getInputsByRegex($pattern, $type='string', $default=NULL) {
	
		$list = array();
		
		foreach ($_POST as $name=>$value) {
			
			if (preg_match($pattern, $name) or $default) {
				
				$val = $_POST[$name] ? $_POST[$name] : $default;
				$val = self::castTo($val, $type);
				
				$list[$name] = $val;
				
			}
			
		}
	
		return $list;
	
	}