|
|
|
IsValidEmail - Validate an email address
|
Total Hit (3596) |
«Code LangId=2»
Function IsValidEmail(ByVal Value As String, Optional ByVal MaxLength As _
Integer = 255, Optional ByVal IsRequired As Boolean = True) As Boolean
If Value Is Nothing OrElse Value.Length = 0 Then
' rule out the null string case
Return Not IsRequired
....Read More |
Rating
|
|
|
IsValidUsPhoneNumber - Validating a US phone number
|
Total Hit (3033) |
«Code LangId=2»
' Validate a US phone number
' Example:
' MessageBox.Show(IsValidUsPhoneNumber("(123) 456-7890")) ' True
' MessageBox.Show(IsValidUsPhoneNumber("(123) 456-78901")) ' False
Function IsValidUsPhoneNumber(ByVal phnNum As String) As Boolean
Return System.Text.RegularExp
....Read More |
Rating
|
|
|
IsValidUsSSN - Validating a US Social Security Number (SSN)
|
Total Hit (4059) |
«Code LangId=2»
' Validate a US Social Security Number
' Example:
' MessageBox.Show(IsValidUsSSN("123-12-1234")) ' True
' MessageBox.Show(IsValidUsSSN("123-123-1234")) ' False
Function IsValidUsSSN(ByVal ssn As String) As Boolean
Return System.Text.RegularExpressions.Regex.IsMatch(
....Read More |
Rating
|
|
|
IsValidUsZip - Validating a US ZIP code
|
Total Hit (2862) |
«Code LangId=2»
' Validate a US ZIP code
' Example:
' MessageBox.Show(IsValidUsZip("12345")) ' => True
' MessageBox.Show(IsValidUsZip("12345-1234")) ' => True
' MessageBox.Show(IsValidUsZip("12345-12345")) ' => False
Function IsValidUsZip(ByVal zip As String) As Boolean
Re
....Read More |
Rating
|
|
|
TrimEx function using Regular Expression.
|
Total Hit (3282) |
Regular Trim function only removes preceding and trailing space but it does not remove all other white space characters e.g. New Line(\n), Carraige return(\r), Form Feed(\f), Tab(\t). To remove these characters you can easily implement function using Regular expression.
....Read More |
Rating
|
|
|
|
HTML Color Coding for various Languages (i.e. VB, VB.net, SQL).
|
Total Hit (10762) |
I spent several hours to find some article to convert Source Code into HTML with different colorcode for keywords/literal/comment/function. But no luck and finally I wrote my own ColorCoding Engine. This article will show you how you can utilize power of Regular Expression to solve your very complex
....Read More |
Rating
|
|
|
Leverage Regular Expressions
|
Total Hit (2043) |
Regular expressions provide a simple and efficient way—far beyond the capabilities most conventional programming languages offer—to search and replace text. However, relatively few developers are familiar with this powerful tool. I'll explain how you can leverage regular expressions from VB.NET to s
....Read More |
Rating
|
|
|
|
An Introduction to Regular Expressions and Their Use in .NET II...
|
Total Hit (1634) |
In the first article in this series we introduced background information regarding regular expressions as well as starting to look at the support for regular expressions in .NET. In this article we'll look in more detail at this latter area.
|
Rating
|
|
|
An Introduction to Regular Expressions and Their Use in .NET I...
|
Total Hit (2630) |
Regular expressions pop up in several locations in .NET and its supporting technologies. A prime example would be in the RegularExpression server validation control but the power of regular expressions are also utilised elsewhere, for example within XSD schemas with the pattern facet. This gives a g
....Read More |
Rating
|
|
|
Formatting with Regular Expressions
|
Total Hit (2911) |
If you're familiar with regular expressions, you know that they can be used for pattern matching and replacement in strings. (If you are not familiar with regular expressions, you're missing out on a powerful technology that has a myriad of applications. Read An Introduction to Regular Expressions t
....Read More |
Rating
|
|
|
Common Applications of Regular Expressions
|
Total Hit (1923) |
Regular Expressions (for those not yet acquainted with them) provide a way of matching patterns of strings that may be simple or extremely complicated and they do it in a very efficient manner. For an introduction to regular expressions in ASP be sure to read: An Introduction to Regular Expressions
....Read More |
Rating
|
|
|
Utilizing Regular Expressions
|
Total Hit (1751) |
This article is a follow-up to an earlier 4Guys article, An Introduction to Regular Expression with VBScript. (If you are not familiar with regular expressions, I highly recommend that you read the An Introduction to Regular Expression with VBScript article!) Since the previous article served more a
....Read More |
Rating
|
|
|
Validate What? Using Regular Expressions to Validate Input
|
Total Hit (1788) |
Validating user input is a basic but very necessary part of web development, especially when dealing with databases. Queries don't go too well when you have !@)#&#$*%?= in the search field. So we have to build a function that searches the input string for illegal characters (defined by you) and then
....Read More |
Rating
|
|
|
|
Picking Out Delimited Text with Regular Expressions
|
Total Hit (1802) |
Have you ever wanted to parse an HTML document and be able to easily grab the text between certain text delimiters? For example, imagine that we wanted to list all the text in an HTML document that falls within any bold tags (<b> ... </b>). Or say that we wanted to grab the text (if any) that was th
....Read More |
Rating
|
|
|
User Tips: Converting URLs into Hyperlinks
|
Total Hit (2086) |
I just finished reading Designing Active Server Pages and was inspired by the regular expressions section. I would like to contribute some code... two functions which are fresh out of the oven!
These functions are to cater for web content stored in a database where URLs & email address are part
....Read More |
Rating
|
|
|
Stripping HTML Tags using Regular Expressions
|
Total Hit (1934) |
Have you ever wanted to strip all of the HTML tags from a string? There are many reasons you may want to do this. For example, if you provide a feature on your site where a user can have the contents of a Web page emailed to them, you may wish to strip all of the HTML tags from the particular articl
....Read More |
Rating
|
|
|
Utilizing Regular Expression SubMatches
|
Total Hit (1679) |
This article examines advanced features of regular expressions. For more basic and beginner-level information on regular expressions, as well as a number of articles illustrating various applications of regular expressions, be sure to check out the articles at the Regular Expression Article Index!
....Read More |
Rating
|
|
|
|
|
Microsoft Beefs Up VBScript with Regular Expressions
|
Total Hit (1342) |
In this article, I'll describe all objects related to VBScript Regular Expressions, summarize common regular expression patterns, and provide some examples of using regular expressions in code.
|
Rating
|
|