<br>&nbsp;&nbsp; Adam, just use the metadata brackets leaving them blank. This should work:<br><br>[when][][Ff]act value is &quot;{value}&quot;= SomeFact( value == &quot;{value}&quot;)<br><br>&nbsp;&nbsp; The first 2 pairs of [] have special semantics for the engine. After them, you can place your regexps.
<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/10/23, Adam Lewandowski &lt;<a href="mailto:adam@alewando.com">adam@alewando.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I just upgraded to 4.0.3 and want to take advantage of regex support for<br>my DSL. Specifically, I want to be able to use a character class at the<br>start of my expander expression to allow the first character to be case
<br>insensitive. For example (in the expander definition):<br><br>[when][Ff]act value is &quot;{value}&quot;= SomeFact( value == &quot;{value}&quot;)<br><br>So that the rule could be written as &quot;Fact value is...&quot; or &quot;fact value
<br>is....&quot;. But I think this conflicts with a syntax that the parser uses<br>to add constraints to the previous declaration (according to the<br>reference docs, section 6.7.4). If I try to use the same character class
<br>construct anywhere other than the first character it works fine.<br>Is there some escape sequence I can use to get what I&#39;m looking for?<br>Simply escaping the [ and ] with \ didn&#39;t work.<br><br>Thanks,<br>Adam Lewandowski
<br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646
<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>