C# regular expressions, HTML & removal of text between <script> tags

J

john.w.blair

Can someone help me out this this please? How does one remove content
between script tags and the script tags themselves using C# regular
expressions?


Thanks!
 
J

John Bokma

wrote:
Can someone help me out this this please? How does one remove content
between script tags and the script tags themselves using C# regular
expressions?

What's the name of the CPAN module you are using (to support C# regexp in
Perl)?
 
C

Chris Mattern

Can someone help me out this this please? How does one remove content
between script tags and the script tags themselves using C# regular
expressions?
One: You do *not* attempt to parse HTML with regexps. Parsing
HTML is a nontrivial task and regular expressions are not adequate.

Two: This is a Perl newgroups. Why would we be able to help you
with C#?

Three: Er, what's the difference between "script tags" and "the script
tags themselves"?

--
Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"
 
T

Tad McClellan

using C# regular
expressions?


You have found the wrong newsgroup.

We do Perl in the Perl newsgroup.


(and regular expressions do not change text anyway, they "match"
or "don't match" strings. Perl has an operator that changes
text and makes use of regular expressions though. What operators
are available to you in C# is a mystery to me. Find a C# newsgroup.
)

(also, using regular expressions on a context-free language such
as HTML is impossible in the general case. You need a Real Parser.
Have you seen the Perl FAQ about removing HTML from a string?
)
 
J

Jürgen Exner

Can someone help me out this this please? How does one remove content
between script tags and the script tags themselves

Please let us know which problems you have with the answer in the FAQ such
that we can improve it.

Are you sure you are in the right NG?
regular expressions?

As has been pointed out many, many times (did you check google, this NG, or
the FAQ) no sane person would try to parse HTML using regular expressions.

jue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top