Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > alt.comp.lang.vbscript > #1
| From | "R.Wieser" <address@is.invalid> |
|---|---|
| Newsgroups | alt.comp.lang.vbscript |
| Subject | a RegEx to find all HTML tags *not* matching a list |
| Date | 2023-08-09 12:02 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <uavo77$3t1cd$1@dont-email.me> (permalink) |
Hello all,
I'm stuck. I've got a simple regex like this :
oRegExp.Pattern = "(<(div|span))"
Text = oRegExp.Replace(Text,"~{$1}~")
, which works ("~{" and "}~" are just delimitors for debugging purposes).
But now I would like to to find all html tags which are *not* either "div"
or "span", and can't seem to find a solution. I thought that simply adding
a "^" negate would work :
oRegExp.Pattern = "(<^(div|span))"
Alas, now /nothing/ matches anymore (but I'm not getting any errors). :-(
I've just spend an hour or so tryinging to google a solution, but can't get
them to work either. :-|
tl;dr:
How do I create a pattern that will match all html tags /but for/ the ones
provided ?
Ah, almost forgot to mention: its about VBScript as running on XP pro.
Regards,
Rudy Wieser
Back to alt.comp.lang.vbscript | Next — Next in thread | Find similar
a RegEx to find all HTML tags *not* matching a list "R.Wieser" <address@is.invalid> - 2023-08-09 12:02 +0200 Re: a RegEx to find all HTML tags *not* matching a list "R.Wieser" <address@is.invalid> - 2023-08-09 13:44 +0200
csiph-web