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, 1842👍, 0💬
Popular Posts:
What does AddressOf operator do in background ? The AddressOf operator creates a delegate object to ...
How can you check to see whether a symbol is defined? You can use the #ifdef and #ifndef preprocesso...
What Happens If the UPDATE Subquery Returns Multiple Rows? - Oracle DBA FAQ - Understanding SQL DML ...
How do we enable SQL Cache Dependency in ASP.NET 2.0? Below are the broader steps to enable a SQL Ca...
How can I search for data in a linked list? Unfortunately, the only way to search a linked list is w...