Post Reply 
Using $NEST
Jan. 03, 2009, 03:40 PM
Post: #8
RE: Using $NEST
Be careful when using $NEST 'cause it matches since the first opening tag it sees inside its byte limit.

Code:
$NEST(<table\s,*name="inner table"*,</table >)

would match:
Code:
<table name="outer table">
  ...
  <table name="inner table">
    ...
  </table>
  ...
</table>

And not would match only the next code how we could wish:
Code:
<table name="inner table">
    ...
  </table>

Trying to match the above using the code wich follows, could cause problems. So the best is what Kye-U and Sidki3k3 reccomends:
Code:
$NEST(<table\s[^>]++name="inner table"*,</table >)

To have a better idea on how nesting works, take a look to the test window of this filter, test it with the above code:
Code:
[Patterns]
Name = "testing nest"
Active = FALSE
Limit = 256
Match = "$NEST(<table\s(*>)\#,*name="inner table"*,</table >)"
Replace = "\@"
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
Using $NEST - Quaraxkad - Jan. 03, 2009, 03:26 AM
RE: Using $NEST - Kye-U - Jan. 03, 2009, 07:36 AM
RE: Using $NEST - Quaraxkad - Jan. 03, 2009, 08:02 AM
RE: Using $NEST - Kye-U - Jan. 03, 2009, 08:04 AM
RE: Using $NEST - Quaraxkad - Jan. 03, 2009, 08:08 AM
RE: Using $NEST - Quaraxkad - Jan. 03, 2009, 11:11 AM
RE: Using $NEST - sidki3003 - Jan. 03, 2009, 12:46 PM
RE: Using $NEST - lnminente - Jan. 03, 2009 03:40 PM
RE: Using $NEST - PAEz - Nov. 14, 2009, 06:02 PM
RE: Using $NEST - JJoe - Nov. 14, 2009, 09:32 PM
RE: Using $NEST - PAEz - Nov. 15, 2009, 07:16 AM
RE: Using $NEST - JJoe - Nov. 15, 2009, 03:46 PM

Forum Jump: