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;
	
	}
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;
	
	}
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 ; }
Gets all submitted field name that matches regular expressions.

@param	string	Regular expression, for instance #[A-Z][A-Z_]+#.
@param	string	Type string, int, bool, date or datetime will be casted.
@param	string	Default value to return, in case of null or empty.

@return	array
Gets all submitted field name that matches regular expressions .