Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicPythonRubySQL ServerSwiftTclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.js

Visual Basic 6.0 Examples

Async
Certificates
ECC
Email Object
Encryption
FTP
HTML-to-XML/Text
Gzip
HTTP
IMAP
JSON
MHT / HTML Email
PEM
PFX/P12
Java KeyStore (JKS)
POP3
RSA Encryption
MIME
REST
SCP
SMTP
Socket/SSL/TLS
SSH Key
SSH
SFTP
Stream
Tar Archive
XML
XMP
Zip

More Examples...
Google APIs
Google Cloud Storage
Azure Cloud Storage
Amazon S3 (new)
Google Drive
ASN.1
PRNG
Amazon S3
Bounced Email
CSV
Diffie-Hellman
DKIM / DomainKey
DSA
NTLM
QuickBooks

 

 

 

 

 

 

 

String Pattern Matching

This example explains how to do string pattern matching in Visual Basic.

' The Like operator pays attention to the current Option Compare setting.
' Setting it to text makes the pattern matching case-insensitive.
Option Compare Text
' Use Option Compare Binary for case-sensitive string pattern matching.
' Option Compare Binary


' The Like string operator provides string pattern matching in Visual Basic.
' * matches zero or more of any character.
' ? matches any single character.
' # matches any single digit.
' Match ranges of characters by enclosing the range in brackets:
'    [A-C] Matches any of A, B, or C
'    [ABC] Same as [A-C]
' Match characters not in a range by using !
'    [!A-Z]  Any character not including A-Z

Dim s As String
s = "Chilkat Software 1234 ABCD"

If s Like "*Software*" Then
    Print "Contains Software"
End If

If s Like "[!0-9]??*" Then
    ' Match any three characters such that the first cannot be a digit.
    Print "Matches!"
End If

 

 

© 2000-2016 Chilkat Software, Inc. All Rights Reserved.