Post Reply 
Character '>' in Attribute Values
Nov. 28, 2012, 02:14 AM
Post: #2
RE: Character '>' in Attribute Values
(Nov. 27, 2012 10:10 AM)neverwasinparis Wrote:  so why is '[^>]++' used?

[^>]++ is used to make the matching expression fail (and maybe match) quicker.

Consider: <div >stuff<div onclick="A

where you want to find: <div onclick="A

An expression like <div[^>]++onclick="a will fail quickly at <div >.

<div*onclick="a will find the first <div and search past the first >. This wastes time and may reqire additional code to negate an unwanted match.

Of course, the rest of the expression must match what [^>]++ does not. sidki is very good at this. Wink
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Character '>' in Attribute Values - JJoe - Nov. 28, 2012 02:14 AM

Forum Jump: