-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
hi. thanks for this utility.
i'm trying to use the :not()
pseudo-class, but either i'm using it incorrectly, i misunderstand how it works, or it isn't working. (i'm basicaly looking for a grep -v
version, to produce a .html file that does not have a given element.)
1218
, the "positive" version, is the typical use, and works fine. 1219
, still "positive", makes me think i don't understand -- why are things duplicated? 1220
and 1221
are the negative form, but <div>s
still appear on the output.
bash apollo2 (master): {1218} echo '<div>this is a test</div><a href=foo.com>' | hq 'div' data
<div>this is a test</div>
bash apollo2 (master): {1219} echo '<div>this is a test</div><a href=foo.com>' | hq '*' data
<html><head></head><body><div>this is a test</div><a href="foo.com">
</a></body></html>
<head></head>
<body><div>this is a test</div><a href="foo.com">
</a></body>
<div>this is a test</div>
<a href="foo.com">
</a>
bash apollo2 (master): {1220} echo '<div>this is a test</div><a href=foo.com>' | hq '*:not(div)' data
<html><head></head><body><div>this is a test</div><a href="foo.com">
</a></body></html>
<head></head>
<body><div>this is a test</div><a href="foo.com">
</a></body>
<a href="foo.com">
</a>
bash apollo2 (master): {1221} echo '<div>this is a test</div><a href=foo.com>' | hq ':not(div)' data
<html><head></head><body><div>this is a test</div><a href="foo.com">
</a></body></html>
<head></head>
<body><div>this is a test</div><a href="foo.com">
</a></body>
<a href="foo.com">
</a>
Metadata
Metadata
Assignees
Labels
No labels