Solved

check the html tag

Posted on 2004-08-30
4
210 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

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 tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

734 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