<?xml version="1.0" encoding="windows-1252"?>
<node id="1008540" title="Re: Find all strings containing &quot;a&quot; characters, that are not followed by &quot;b&quot; characters." created="2012-12-12 12:59:52" updated="2012-12-12 12:59:52">
<type id="11">
note</type>
<author id="190859">
bart</author>
<data>
<field name="doctext">
Try 
&lt;c&gt;
/a(?!b)/
&lt;/c&gt;
with negative lookahead.

&lt;p&gt;And yes, your regexp looks rather OK, except I would drop a few &lt;c&gt;\b&lt;/c&gt; anchors:

&lt;c&gt;
/a\b|a[^b]/
&lt;/c&gt;
or combined:
&lt;c&gt;
/a(\b|[^b])/
&lt;/c&gt;


Will that do?

</field>
<field name="root_node">
1008535</field>
<field name="parent_node">
1008535</field>
</data>
</node>
