Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
Assuming $_ contains HTML, which of the following substitutions will remove all tags in it?
Assuming $_ contains HTML, which of
the following substitutions will remove all tags in it?
1.s/<.*>//g;
2.s/<.*?>//gs;
3.s/<\/?[A-Z]\w*(?:\s+[A-Z]\w*(?:\s*=\s*(?:(["']).*?\1|[\w-.]+))?)*\s*>//gsix;
✍: Guest
You can't do that.
If it weren't for HTML comments, improperly formatted
HTML, and tags with interesting data like < SCRIPT >, you
could do this. Alas, you cannot. It takes a lot
more smarts, and quite frankly, a real parser.
2013-08-29, 1807👍, 0💬
Popular Posts:
If client side validation is enabled in your Web page, does that mean server side code is not run? W...
What is the difference between delegate and events? ã Actually events use delegates in bottom. But ...
Can static variables be declared in a header file? You can't declare a static variable without defin...
What is V model in testing? V model map’s the type of test to the stage of development in a project....
How do I use a scriptlet to initialize a newly instantiated bean? A jsp:useBean action may optionall...