<?xml version="1.0" encoding="windows-1252"?>
<node id="612381" title="Regexp Confuzzelemt" created="2007-04-27 10:11:54" updated="2007-04-27 06:11:54">
<type id="115">
perlquestion</type>
<author id="535392">
AntsPants</author>
<data>
<field name="doctext">
Bonjour Monkers,
&lt;p /&gt;
I have a regex that just doesn;t do what I think it should, no matter how loud I read out in English what it should be doing ;)
&lt;p /&gt;
Trying to match blah/blah/blah#ThisIsWhatIWant?ButNotThisEtc
&lt;p /&gt;
&lt;code&gt;
#(.*[^\?]) doesn't work
&lt;/code&gt;
&lt;p /&gt;
Whereas
&lt;p /&gt;
&lt;code&gt;
#([\w]+[^\?]) does work!!
&lt;/code&gt;
&lt;p /&gt;
the one that fails, I've tried a host of ways including
&lt;p /&gt;
&lt;code&gt;
#(.*)\[^\?\]
#(.+)\[^\?\]
.... and more
&lt;/code&gt;

&lt;p /&gt;
But I keep getting ThisIsWhatIWant?ButNotThisEtc matched
&lt;p /&gt;
Any pointers would be terrrrrrrrrific.
&lt;p /&gt;
Merci
&lt;p /&gt;
-Ants
</field>
</data>
</node>
