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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
<[a-zA-Z][^>]*\son\w+=(\w+|'[^']*'|"[^"]*")[^>]*>
Description
Find HTML tags that have javascript events attached to them.
Matches
<IMG onmouseover="window.close()">
Non-Matches
<IMG src="star.gif">
Author Rating: Not yet rated. Lewis Moten
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: How to match ( Parentheses character?
Name: Hector G
Date: 1/10/2011 5:15:55 PM
Comment:
Hey, This is wonderful regex. I just have a question, I need to match the parentheses character only, to check for something like: "return function(param1,param2,param3)", how do I check for the both parantheses "()" character? I tried \\( and \\) but didn't work. It works with \\p[Punct] but that includes all punctuation characters and I only need parentheses characters. Thanks


Title: Question
Name: bizbiz
Date: 3/31/2005 2:23:42 PM
Comment:
Do you write a regular expression who find also things like that : <img src="javascript:[code]">


Title: Sorry
Name: Joe Compeau
Date: 12/13/2003 2:20:48 PM
Comment:
Sorry, yes it does actually, I guess you need to have the Regex Option to ignore pattern white spaces


Title: This doesnt work..
Name: Joe Compeau
Date: 12/13/2003 2:17:15 PM
Comment:
This doesnt work..


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