Regular Expressions Repace Pattern 
Author Message
 Regular Expressions Repace Pattern

I need some help creating a pattern to match tags in a html stream.

What I basically need is to replace everything that starts and ends with the
characters < and >. I want to replace those instances with a blank space or
"".

So, what should the pattern look like for doing this with regex.replace?

/Andrew



Sat, 30 Aug 2003 18:19:20 GMT  
 Regular Expressions Repace Pattern
Got an answer...
"\<.*\>" also works!
/Andrew

----------------------

Andrew,
    Try
<[^>]+>
for your search.  This is an opening angle bracket followed by one or more
non closing angle bracket characters followed by a closing angle bracket.
Look in the VS help for the Replace Dialog box and then click the Regular
Expressions link for a page with explanations.

Ron Allen

Quote:

> I need some help creating a pattern to match tags in a html stream.

> What I basically need is to replace everything that starts and ends with
the
> characters < and >. I want to replace those instances with a blank space
or
> "".

> So, what should the pattern look like for doing this with regex.replace?

> /Andrew


> I need some help creating a pattern to match tags in a html stream.

> What I basically need is to replace everything that starts and ends with
the
> characters < and >. I want to replace those instances with a blank space
or
> "".

> So, what should the pattern look like for doing this with regex.replace?

> /Andrew



Sat, 30 Aug 2003 22:25:56 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Regular expressions and/or pattern matching in VBA?

2. Regular Expressions to Match a Pattern

3. needed: regular expression pattern

4. regular expression pattern

5. Regular Expression Pattern with Smart Quotes

6. Repetitive pattern devided by space in regular expression

7. HELP - adv. regular expression - pattern

8. This regular expression pattern should be easy

9. Regular Expression, ORing the patterns.

10. Regular Expression -Pattern Operator

11. Regular expression pattern

12. needed: regular expression pattern...

 

 
Powered by phpBB® Forum Software