Solved

check the html tag

Posted on 2004-08-30
4
204 Views
Last Modified: 2013-12-25
I want to check a string that is there a html tag in it.
How can i do for it?
0
Comment
Question by:aresdeng
  • 2
  • 2
4 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 11938766
What language?

Let's assume Perl.

Here's a not so robust way of checking:

$string = 'some text with a <tag> in it';

print "String may contain a HTML tag\n" if ($string =~ /<.*>/);

If you want to check for valid HTML tags or tags that are split across lines, things get a little more complicated.
0
 

Author Comment

by:aresdeng
ID: 11938896
Thank you.

I want to check for valid HTML tags.
How can i do?
0
 
LVL 48

Accepted Solution

by:
Tintin earned 125 total points
ID: 11938933
0
 

Author Comment

by:aresdeng
ID: 11939209

thank you.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
This article will show, step by step, how to integrate R code into a R Sweave document
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now