Could use some help with Regex searching with NetBeans 7.01’s find function.
I’m trying to exclude multiple strings. Specifically, the target lines:
<div class="table_left">
<div class="table_right">
<div class="table_clear">
I need to match only the third and other Div classes that are not either table_left or table_right.
I’ve tried:
class="table_(((?!left).*)|((?!right).*))
and
class="table_(left|right){0}
I realized while pasting my first Regex line that I’m matching not right OR not left, which is returning both. What is the proper way to specify two conditions? The and operator?
The joys of searching for words that are also Boolean operators…
Try this pattern:
which wouldn’t match:
but would match:
EDIT
Ah, okay, that would look like:
or
as you already found yourself (but I included it in my answer for completeness sake).
A quick explanation of the pattern
<div\s+class="table_(?!left|right)[^"]+":