<br> If you are using MR3 or later, the correct syntax is "not matches". Before this version, you must use a predicate.<br><br> []s<br> Edson<br><br><br><div><span class="gmail_quote">2007/7/13, Manukyan, Sergey <
<a href="mailto:SManukyan@lear.com">SManukyan@lear.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;">
<div link="blue" vlink="blue" style="" lang="EN-US">
<div>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Nope .. it doesn't work either….</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<div>
<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr align="center" size="2" width="100%">
</span></font></div>
<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users-bounces@lists.jboss.org</a>
[mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users-bounces@lists.jboss.org</a>] <b><span style="font-weight: bold;">On
Behalf Of </span></b>Sarika Khamitkar<br>
<b><span style="font-weight: bold;">Sent:</span></b> Friday, July 13, 2007 5:06
PM<br>
<b><span style="font-weight: bold;">To:</span></b> Rules Users List<br>
<b><span style="font-weight: bold;">Subject:</span></b> RE: [rules-users]
negation for matches</span></font></p>
</div><div><span class="e" id="q_113c17f5f37da3b1_1">
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">You can try:</span></font></p>
<p style="text-indent: 0.5in;"><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">$s : SupplierView(suppCode not </span></font><b><font color="#960000" face="Courier New" size="2">
<span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">matches</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;"> </span></font><font color="green" face="Courier New" size="2">
<span style="font-size: 10pt; color: green;">"\\d\\d.*"</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">)</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<div>
<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr align="center" size="2" width="100%">
</span></font></div>
<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users-bounces@lists.jboss.org</a>
[mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users-bounces@lists.jboss.org</a>] <b><span style="font-weight: bold;">On
Behalf Of </span></b>Manukyan, Sergey<br>
<b><span style="font-weight: bold;">Sent:</span></b> Friday, July 13, 2007 4:49
PM<br>
<b><span style="font-weight: bold;">To:</span></b> Rules Users List<br>
<b><span style="font-weight: bold;">Subject:</span></b> [rules-users] negation
for matches</span></font></p>
</div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<div>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Folks,</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">How can I negate the matches?, like for
those that don't match certain criteria do that</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">I tried something like this but it
doesn't work:</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p style=""><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">rule</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">
</span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; color: green;">"SupplierView:
Supplier code's first two characters should be numeric."</span></font></p>
<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;"> </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">
when</span></font></b></p>
<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">
$s : SupplierView(!(suppCode </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">matches</span></font></b><font color="black" face="Courier New" size="2">
<span style="font-size: 10pt; color: black;"> </span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; color: green;">"\\d\\d.*"</span></font><font color="black" face="Courier New" size="2">
<span style="font-size: 10pt; color: black;">))</span></font></p>
<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;"> </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">
then</span></font></b></p>
<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">
ValidationErrorFacade.getInstance().registerError($s, </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">new</span></font></b><font color="black" face="Courier New" size="2">
<span style="font-size: 10pt; color: black;"> ValidationError(</span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; color: green;">"Supplier code's first two characters should be
numeric."</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">));</span></font></p>
<p style=""><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">end</span></font></b></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">
</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Thanks,</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">-Sergey</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
</div>
</span></div></div>
</div><div><span class="e" id="q_113c17f5f37da3b1_3">
<table><tbody><tr><td bgcolor="#ffffff"><font color="#000000">**********************<br>
** LEGAL DISCLAIMER **<br>
**********************<br>
<br>
This E-mail message and any attachments may contain <br>
legally privileged, confidential or proprietary <br>
information. If you are not the intended recipient(s),<br>
or the employee or agent responsible for delivery of <br>
this message to the intended recipient(s), you are <br>
hereby notified that any dissemination, distribution <br>
or copying of this E-mail message is strictly <br>
prohibited. If you have received this message in <br>
error, please immediately notify the sender and <br>
delete this E-mail message from your computer.<br>
</font></td></tr></tbody></table></span></div><br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">
rules-users@lists.jboss.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users
</a><br><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>