VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Match() Check any string for any number of characters.

Matthew Roberts  (26 Submissions)   String Manipulation   Visual Basic 3.0   Beginner   Wed 3rd February 2021

Simple function to validate string contents. Compares a given string to a list of illegal values and evaluates whether or not it contains any. Very fast and easy. Can also be used as a string search function with a little modification.

Inputs
strSource - String you are checking strCompare - String of illegal characters

Assumes
To run: If Match (strMyFile, "~!@#$%^&*()+`{}[]?><,/") Then MsgBox "File contains illegal characters!", vbExclaimation End If .

Returns
Boolean - True = Source string contains an illegal character.

Rate Match() Check any string for any number of characters. (4(4 Vote))
Match() Check any string for any number of characters..bas

Match() Check any string for any number of characters. Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters