[thelist] Detecting HTML tags with Regular Expressions.

Denis, David DDenis at inlumen.com
Mon May 7 21:26:24 CDT 2001

seems to me this'll match: '<(\w+)>' and '<\/(\w+)>'
but it won't ensure they are valid html tags which you seem to require.  The
only way for that is to actually compare against every possible html tag.


> -----Original Message-----
> From: Johnny Lam [mailto:jlam at popcast.com]
> Sent: Monday, May 07, 2001 9:24 PM
> To: List (E-mail)
> Subject: [thelist] Detecting HTML tags with Regular Expressions.
> I'd like to know what is the actual Regular Expression 
> pattern that would
> match any html tags using Javascript. For example any html 
> code between the
> "<" and ">" or "</" and ">" characters. I'm trying to do a 
> form validation
> in which it will match any user's input, which can include 
> html tags, and
> compare it with another list of valid html tags they can use. 
> Any help would
> be great. Thanks.
> Thank You! 
> Johnny 
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt ! 

More information about the thelist mailing list