RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find (X)HTML click events
Expression
(?i:on(blur|c(hange|lick)|dblclick|focus|keypress|(key|mouse)(down|up)|(un)?load|mouse(move|o(ut|ver))|reset|s(elect|ubmit)))
Description
This regex will match all the valid on event attributes in HTML 4.01/XHTML 1.0
Matches
onclick | onsubmit | onmouseover
Non-Matches
click | onandon | mickeymouse
Author Rating: The rating for this expression. Michael Ash
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Thanks for the pattern
Name: Darren Neimke
Date: 1/17/2004 7:52:42 AM
Comment:
Thanks for the pattern Michael, for your information I put it to use in a screen scraping program to remove scripts from pages; you can see the code here: http://blogs.regexadvice.com/dneimke/archive/2004/01/17/346.aspx


Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials