Find HTML tags

by Svelmoe 30. August 2007 14:01

Some regular expression for finding HTML tags in code.

It is - as always is the case with regular expression in my view - not perfect, but it'll do for fast, simple parsing.

Find HTML tags:
<[^>]*>

This can be modified easy to find HTML tags except for anchor tags (for example):
<[^>aA]*>

 

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading



About Svelmoe

My real name is Allan Svelmøe Hansen.

I live in Denmark, where I work as a developer for hedal:kruse:brohus using SQL Server and the .NET framework since 2004. Svelmoe.dk is a place for my every day thoughts and reactions and the occasional technical blog entry.

I also blog about SQL and MS SQL Server at www.execsql.com so in case you are looking for more about that, please visit that website.



View Allan Svelmøe Hansen's profile on LinkedIn     

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 Svelmoe.dk