mathieu_cupryk
asked on
regular expression in explorer 6 and 7
In explorer 6 I need to remove "about:blankahm-011-en.htm l#AHM011-3 .1"
about:blank infront of ahm-011-en.html#AHM011-3.1
and in explorer 7 I need to remove the about:
NewMatch = Regex.Matches(Str2LookIn, @"^about:[blank]*([\#a-z0- 9\._-]*)", RegexOptions.IgnoreCase);
about:blank infront of ahm-011-en.html#AHM011-3.1
and in explorer 7 I need to remove the about:
NewMatch = Regex.Matches(Str2LookIn, @"^about:[blank]*([\#a-z0-
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I hope that this is what you are looking for.
Imports System.Text.RegularExpress
Dim input As String = "about:blankahm-011-en.htm
Dim output As String
output = Regex.Replace(input, "(about:blank)(ahm)", "$2", RegexOptions.IgnoreCase)
'output will have the value = "ahm-011-en.html#AHM011-3.
output = Regex.Replace(input, "(about:)(blankahm)", "$2", RegexOptions.IgnoreCase)
'output will have the value = "blankahm-011-en.html#AHM0
Fernando