NET SFTP Library
WildcardToRegex Method
Example 






KellermanSoftware.NetSFtpLibrary Namespace > SFTP Class : WildcardToRegex Method
Translate a wildcard pattern to a regex string
Syntax
'Declaration
 
Public Function WildcardToRegex( _
   ByVal wildcard As System.String _
) As System.String
'Usage
 
Dim instance As SFTP
Dim wildcard As System.String
Dim value As System.String
 
value = instance.WildcardToRegex(wildcard)
public System.string WildcardToRegex( 
   System.string wildcard
)
public function WildcardToRegex( 
    wildcard: System.String
): System.String; 
public function WildcardToRegex( 
   wildcard : System.String
) : System.String;
public: System.string* WildcardToRegex( 
   System.string* wildcard
) 
public:
System.String^ WildcardToRegex( 
   System.String^ wildcard
) 

Parameters

wildcard
Example
SFTP sftp = new SFTP(); //Trial Mode            
            //SFTP sftp = new SFTP("place user name here", "place license key here");
             
            string wildcard = "*.cs";
            string regexString = sftp.WildcardToRegex(wildcard);
             
            Console.WriteLine("Pattern {0} was changed to {1}",wildcard,regexString);
Dim sftp As SFTP = New SFTP() 'Trial Mode
            'Dim sftp As SFTP = New SFTP("place user name here", "place license key here");
             
            Dim wildcard As String = "*.cs"
            Dim regexString As String = sftp.WildcardToRegex(wildcard)
             
            Console.WriteLine("Pattern {0} was changed to {1}",wildcard,regexString)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SFTP Class
SFTP Members