Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

regular expression in explorer 6 and 7

Posted on 2006-11-22
2
Medium Priority
?
159 Views
Last Modified: 2010-04-16
In explorer 6  I need to remove "about:blankahm-011-en.html#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);


0
Comment
Question by:mathieu_cupryk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 64

Expert Comment

by:Fernando Soto
ID: 17998821
Hi mathieu_cupryk;

I hope that this is what you are looking for.

Imports System.Text.RegularExpressions

        Dim input As String = "about:blankahm-011-en.html#AHM011-3.1"
        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.1"

        output = Regex.Replace(input, "(about:)(blankahm)", "$2", RegexOptions.IgnoreCase)

        'output will have the value = "blankahm-011-en.html#AHM011-3.1"


Fernando
0
 
LVL 64

Accepted Solution

by:
Fernando Soto earned 2000 total points
ID: 17998851
Sorry here it is in C#.

using System.Text.RegularExpressions;

        string input = "about:blankahm-011-en.html#AHM011-3.1";
        string output;

        output = Regex.Replace(input, "(about:blank)(ahm)", "$2", RegexOptions.IgnoreCase);

        'output will have the value = "ahm-011-en.html#AHM011-3.1"

        output = Regex.Replace(input, "(about:)(blankahm)", "$2", RegexOptions.IgnoreCase);

        'output will have the value = "blankahm-011-en.html#AHM011-3.1"

Fernando
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Screencast - Getting to Know the Pipeline
Suggested Courses

596 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question