There are many issues when you upgrade your machine. One such issue came up with upgradation - the .NET Framework 2.0 update not found. The win32manifest will not be embedded.
One way to solve this is uninstall .NET 3.5 framework and re-install it.Friday, June 20, 2008
Solution for .NET Framework 2.0 update not found. The win32manifest will not be embedded.
Sunday, June 1, 2008
Extract Ref Links From WebPage using VB.Net Regular Expressions
Extract Links From WebPage using VB.Net Regular Expressions
Sub Extract_Links_From_WebPage()
Dim oReg As Regex
Dim oMat As Match
Dim sInputString As String
Dim sLink As String
sInputString = "some have links that direct to some html files
oReg = New Regex("href\s*=\s*(?:""(?<>[^""]*)(?<>\S+))", RegexOptions.Compiled Or RegexOptions.IgnoreCase)
oMat = oReg.Match(sInputString)
While oMat.Success
sLink = oMat.Groups("link").ToString
End While
End Sub
The above code uses Group class, which represents the results from a single capturing group. Because Group can capture zero, one, or more strings in a single match (using quantifiers), it contains a collection of Capture objects. Because Group inherits from Capture, the last substring captured can be accessed directly (the Group instance itself is equivalent to the last item of the collection returned by the Captures property).
Instances of Group are returned by indexing the GroupCollection object returned by the Groups property. The indexer can be a group number or the name of a capture group if the "(?< groupname >)" grouping construct is used. For example, in C# code you can use Match.Groups[groupnum] or Match.Groups["groupname"], or in Visual Basiccode you can use Match.Groups(groupnum) or Match.Groups("groupname").
In the above example ?<>[^""]*stores the match found by [^""]* pattern in the group ‘link’, Which can be accessed by Groups("link")
See Also
Extract Ref Links From WebPage using VB.Net Regular Expressions
Remove HTML Tags from String using .NET Regular Expressions
VB.NET Regular Expression to Check URL
VB.NET Regular Expression to Check Email Addresses
VB.NET Regular Expression to Check MAC Address
Regular Expression to Check Zip Code
Validate eMail Addresses using VB.NET Function
Regular Expressions in Dot Net (.NET)
Remove HTML Tags from String using .NET Regular Expressions
Strip HTML Tags from String using Regular Expressions
Sub Regex_Replace_Example()
Dim oReg As Regex
Dim sInput As String
Dim sOut As String
' Strip of Simple HTML Tags
sInput = "This is a HTML Text"
oReg = New Regex("")
sOut = oReg.Replace(sInput, "?\W+>", "")
' Strip of Complex HTML Tags
sInput = "This is a HTML Text with images "
oReg = New Regex("")
sOut = oReg.Replace(sInput, "<[^<>]+>", "")
End Sub
Extract Ref Links From WebPage using VB.Net Regular Expressions
Remove HTML Tags from String using .NET Regular Expressions
VB.NET Regular Expression to Check URL
VB.NET Regular Expression to Check Email Addresses
VB.NET Regular Expression to Check MAC Address
Regular Expression to Check Zip Code
Validate eMail Addresses using VB.NET Function
Regular Expressions in Dot Net (.NET)
VB.NET Regular Expression to Check URL
VB.NET Regular Expression to Validate Url
Imports System.Text.RegularExpressions
Function IsValid_URL_Address(ByVal sURLAdd As String)
Return Regex.IsMatch(sURLAdd, "(https?ftp):\/\/([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})(:\d{1,4})?([-\w\/#~:.?+=&%@~]*)/")
End Function
The above will check for URL like http://www.dotnetdud.com etc
See Also
Extract Ref Links From WebPage using VB.Net Regular Expressions
Remove HTML Tags from String using .NET Regular Expressions
VB.NET Regular Expression to Check URL
VB.NET Regular Expression to Check Email Addresses
VB.NET Regular Expression to Check MAC Address
Regular Expression to Check Zip Code
Validate eMail Addresses using VB.NET Function
Regular Expressions in Dot Net (.NET)
VB.NET Regular Expression to Check Email Addresses
VB.NET Regular Expression to Validate Email Addresses
Imports System.Text.RegularExpressions
Function IsValid_eMail_Address(ByVal sEmailAdd As String)
Return Regex.IsMatch(sEmailAdd, "[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z_+])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9}$"
End Function
The above will check for email like sales@dotnetdud.com etc and will reject sample@vbadud.c
Or -@vbadud.cm
See Also
Extract Ref Links From WebPage using VB.Net Regular Expressions
Remove HTML Tags from String using .NET Regular Expressions
VB.NET Regular Expression to Check URL
VB.NET Regular Expression to Check Email Addresses
VB.NET Regular Expression to Check MAC Address
Regular Expression to Check Zip Code
Validate eMail Addresses using VB.NET Function
Regular Expressions in Dot Net (.NET)
VB.NET Regular Expression to Check MAC Address
Regular Expression to Validate MAC Address
Imports System.Text.RegularExpressions
Function IsValid_MAC_Address(ByVal sMacAdd As String)
Return Regex.IsMatch(sMacAdd, "/^([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$")
End Function
The above will check for MAC Address like 22:13:35:67:49:ab etc
See Also
Extract Ref Links From WebPage using VB.Net Regular Expressions
Remove HTML Tags from String using .NET Regular Expressions
VB.NET Regular Expression to Check URL
VB.NET Regular Expression to Check Email Addresses
VB.NET Regular Expression to Check MAC Address
Regular Expression to Check Zip Code
Validate eMail Addresses using VB.NET Function
Regular Expressions in Dot Net (.NET)
Regular Expression to Check Zip Code
Regular Expression to Match Zip Code
Imports System.Text.RegularExpressions
Function IsValidZip(ByVal sZipCode As String)
Return Regex.IsMatch(sZipCode, "^\d{5}(\-\d{4})?$")
End Function
The above will check for U.S . Zip codes like 55001-2434. 94941-3232 etc
To Check Indian Zip codes use
Imports System.Text.RegularExpressions
Function IsValidZip(ByVal sZipCode As String)
Return Regex.IsMatch(sZipCode, "^\d{6}$")
End Function
Matches 600040, 400123 etc
Extract Ref Links From WebPage using VB.Net Regular Expressions
Remove HTML Tags from String using .NET Regular Expressions
VB.NET Regular Expression to Check URL
VB.NET Regular Expression to Check Email Addresses
VB.NET Regular Expression to Check MAC Address
Regular Expression to Check Zip Code
Validate eMail Addresses using VB.NET Function
Regular Expressions in Dot Net (.NET)