Solved

check the html tag

Posted on 2004-08-30
4
209 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
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 tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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…

820 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