<br> Adam, just use the metadata brackets leaving them blank. This should work:<br><br>[when][][Ff]act value is "{value}"= SomeFact( value == "{value}")<br><br> The first 2 pairs of [] have special semantics for the engine. After them, you can place your regexps.
<br><br> []s<br> Edson<br><br><div><span class="gmail_quote">2007/10/23, Adam Lewandowski <<a href="mailto:adam@alewando.com">adam@alewando.com</a>>:</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 "{value}"= SomeFact( value == "{value}")<br><br>So that the rule could be written as "Fact value is..." or "fact value
<br>is....". 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'm looking for?<br>Simply escaping the [ and ] with \ didn'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> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646
<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>