<?xml version="1.0" encoding="windows-1252"?>
<node id="1008542" title="Re: Find all strings containing &quot;a&quot; characters, that are not followed by &quot;b&quot; characters." created="2012-12-12 13:03:35" updated="2012-12-12 13:03:35">
<type id="11">
note</type>
<author id="980564">
aitap</author>
<data>
<field name="doctext">
&lt;p&gt;&lt;del&gt;It looks like you need a [doc://perlre#Look-Around-Assertions|look-ahead assersion]:
&lt;c&gt;
$string = /a(?!b)/;
&lt;/c&gt;&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;EDIT&lt;/b&gt;: Well, I misread the question (paid too much attention to the title). A simple &lt;c&gt;/a/ and !/a.*b/&lt;/c&gt; (++[1008541]) or &lt;c&gt;/^[^a]*a+[^b]*$/&lt;/c&gt; should be enough.&lt;/p&gt;
&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-980564"&gt;
Sorry if my advice was wrong.
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1008535</field>
<field name="parent_node">
1008535</field>
</data>
</node>
