Visual Basic Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CUnicode C++Unicode CMFCDelphi DLLDelphi ActiveXFoxProJavaPerlPHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VB Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
SFTP
SMTP
Socket
Spider
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
Bzip2
PPMD
Deflate
LZW


VB Strings
VB Byte Array

 

 

 

 

 

 

 

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-2013 Chilkat Software, Inc. All Rights Reserved.