I&#39;ve been checking, <br><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/regex/Pattern.html">http://download.oracle.com/javase/1.5.0/docs/api/java/util/regex/Pattern.html</a><br>and the non-capturing groups are documented in there.<br>
<br>What is Hudson using for compiling?<br>-W<br><br><br><br><div class="gmail_quote">On 24 December 2010 16:22, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On 24 December 2010 15:19, Geoffrey De Smet <span dir="ltr">&lt;<a href="mailto:ge0ffrey.spam@gmail.com" target="_blank">ge0ffrey.spam@gmail.com</a>&gt;</span> wrote:<br>
</div><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


  
    
  
  <div text="#000000" bgcolor="#ffffff">
    Hi Laun,<br>
    <br>
    Can you take a look at this regression?<br>
      <a href="https://issues.jboss.org/browse/JBRULES-2849" target="_blank">https://issues.jboss.org/browse/JBRULES-2849</a><br>
    <br></div></blockquote></div><div><br>I shall, but...<br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div text="#000000" bgcolor="#ffffff">


    I believe the usage of &quot;?&quot; in the regexes is wrong (which is causing
    the issue).<br>
    For example: regex &quot;(?&lt;=\\W|^)-\\s*\\s+(.*?)\\s+is\\s+(.*?)$&quot;<br>
    <br>
    The &quot;?&quot; means the character before me might or might not be there.<br>
    so &quot;ab?c&quot; matches on &quot;abc&quot; and &quot;ac&quot;<br>
    The &quot;(&quot; means start of a group.<br>
    So &quot;(?&quot; should fail-fast</div></blockquote></div><div><br>&quot;(?&quot;  is the start of a non-capturing group.<br><br></div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div> (but it doesn&#39;t, just behave differently in
    jdk5 and jdk6).<br></div></blockquote><div><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
    Also &quot;.*?&quot; should fail-fast: either you want &quot;.*&quot; (none or more) or
    &quot;.+&quot; (one ore more).<br>
    </div></blockquote></div><div><br>Not so: This is a non-greedy quantifier, and this has been in the code of 5.1.1. <br><font color="#888888">
<br>-W<br> </font></div><div><div></div><div class="h5"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><br> </div></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div text="#000000" bgcolor="#ffffff">
    Op 24-12-10 11:23, Wolfgang Laun schreef:
    <blockquote type="cite"><div><div></div><div>This is a summary of the currently implemented new
      features for the DSL expansion. I&#39;ll have to add tests and
      documentation, but before doing so, I&#39;d like to learn whether
      there are any objections (resulting in the removal) or suggestions
      for improvement. Myself, I&#39;m not sure about one or two items which
      I&#39;ve marked with &quot;(?)&quot;. Also, there&#39;s a couple of items which
      might gain from easy-to-implement additions, see &quot;Votes, please&quot;.
      An example showing most of the new options is given below.<br>
      <ol>
        <li>The right hand side of entry definitions can be empty.
          (Useful for deleting &quot;filler&quot; phrases.)</li>
        <li>Long entry lines can be split without the need of escaping
          EOL:</li>
        <ul>
          <li>Any line beginning with # or // starts a DSL comment and
            is not passed to the DSL parser.</li>
          <li>Any line beginning with &#39;[&#39; starts a new entry.</li>
          <li>All other lines are appended to the preceding line, with a
            space replacing EOL.</li>
          <li>Empty lines are inserted to maintain original line
            numbers, and line and column numbers in error messages from
            the parser are recalculated to reflect the user view of the
            DSL text.</li>
        </ul>
        <li>The special comment introduction &quot;#/&quot; is used to mark a line
          containing debug options. Currently recognized keywords are:</li>
        <ul>
          <li>result - dumps the resulting DRL</li>
          <li>steps - shows all expansion operations in conditions and
            consequences</li>
          <li>keyword, when, then - display the corresponding entry
            definitions</li>
          <li>usage - shows how often an entry was actually used in an
            expansion</li>
        </ul>
        <li>Variable substitution uses the definition of that variable
          seen last in the current when or then part expansion. not just
          from the current line. (But this probably should keep
          variables from the when part for the following then part.
          Votes, please.)<br>
        </li>
        <li>The value used in a variable substitution can be modified on
          the fly by adding one of the modifiers after and &#39;!&#39; in the
          variable reference. Currently recognized modifiers are:</li>
        <ul>
          <li>uc, lc - convert all letters to upper case or lower case,
            respectively</li>
          <li>ucfirst - convert the first letter to upper case, and all
            other letters to lower case</li>
          <li>num - extract all digits and a &#39;-&#39; preceding the first
            digit and insert the numeric value; a &#39;.&#39; or &#39;,&#39; two digits
            from the right is retained as a decimal point, which is
            useful for monetary quantitites. (?)</li>
        </ul>
        <li>Another modification of the value used for substituting the
          reference is by providing a &quot;multiple choice&quot; after an &#39;!&#39;,
          consisting of strings separated alternatively by &#39;?&#39; and &#39;/&#39;:
          If the string extracted from the DSLR line matches the string
          before a &#39;?&#39;, the string following it is used for
          substitution; otherwise test the next choice. (?)</li>
        <li>A DSL value starting with a hyphen (&#39;-&#39;) can also be used in
          a consequence to add another setter expression into a
          preceding &quot;modify(x){}&quot;. (Should probably be extended to be
          able to handle the insertion of another parameter to any
          preceding method call and, as a special, but useful, case the
          concatenation to a preceding x.println() or x.print() call.
          Votes, please.)</li>
      </ol>
      DSL:<br>
      [when][][Tt]here is an?=<br>
      [when][]{entity} called {x}=<br>
              ${entity!lc}: {entity!ucfirst}( $name:
      name==&quot;{x!M?Mark/E?Edson/G?Geoffrey/unknown}&quot;)<br>
      [when][]and no other with the same {attr}=not {entity!ucfirst}(
      {attr} == ${attr} )<br>
      [then][]change person=modify($person)\{\}<br>
      [then][]- set {attr} to {value} = set{attr!ucfirst}( {value!num} )<br>
      <br>
      DSLR:<br>
      rule &quot;Rule 1&quot;<br>
      when<br>
          There is a PERSON called M<br>
          and no other with the same name<br>
      then<br>
          change person<br>
          - set salary to US$9,999.99<br>
          - set rank to &quot;colonel&quot;<br>
      end<br>
      <br>
      DRL:<br>
         8  rule &quot;Rule 1&quot;<br>
         9  when<br>
        10  $person: Person( $name: name==&quot;Mark&quot;)<br>
        11  not Person( name == $name )<br>
        12  then<br>
        13  modify($person){ setSalary( 9999.99 ), setRank( &quot;colonel&quot; )
      }<br>
        14  end<br>
      <br>
      Cheers<br>
      Wolfgang<br>
      <br>
      <br>
      </div></div><pre><fieldset></fieldset>
_______________________________________________
rules-dev mailing list
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
    </blockquote>
    <br>
    <pre cols="72">-- 
With kind regards,
Geoffrey De Smet</pre>
  </div>

<br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div></div></div><br>
</blockquote></div><br>