private static function PrepareRegexFlags( $flagString )
	{
		// The flag string can only contain s,m,i and/or x
		$result = preg_match( "/[^smix]+/", $flagString);
		if ( $result )
		{
			throw XPath2Exception::withErrorCodeAndParam( "FORX0001", Resources::InvalidRegularExpr, "$flagString" );
		}

		return $flagString;
	}
private static function PrepareRegexFlags( $flagString )
	{
		// The flag string can only contain s,m,i and/or x
		$result = preg_match( "/[^smix]+/", $flagString);
		if ( $result )
		{
			throw XPath2Exception::withErrorCodeAndParam( "FORX0001", Resources::InvalidRegularExpr, "$flagString" );
		}

		return $flagString;
	}
private static function PrepareRegexFlags ( $ flagString ) { // The flag string can only contain s,m,i and/or x
 $ result = preg_match ( "/[^smix]+/" , $ flagString ) ; if ( $ result ) { throw XPath2Exception :: withErrorCodeAndParam ( "FORX0001" , Resources :: InvalidRegularExpr , "$flagString" ) ; } return $ flagString ; }
Check the flag string contents
@param string $flagString
@return string
Check the flag string contents