In DRL you would have to write
x matches (".*_" + $itemID)
Note that you can also write
x str[endsWith] $itemID
This has the subtle difference that all "magic" that can be brought
about by characters in $itemID being used as a pattern is avoided. If,
for instance, an $itemID contains "some.id", the '.' accepts any
character.
(Obviously I'm assuming that $itemID is not meant to contain a
"regular expression".)
-W
On 31/08/2012, TonyN <tony.n.nguyen(a)boeing.com> wrote:
I am not sure if it is my syntax issue or DROOLS (failed to expand
binded
variable), but I cannot get the 'match' to work using either (BRL or DRL)
rules.
basically, I want to do this:
x matches '.*_$itemID'
where $itemID is a binded variable (define in a clause above)....
I am using Guvnor 5.2.0 Final (Does 'match' accept binded variable on this
version?)
thx,
Tony
--
View this message in context:
http://drools.46999.n3.nabble.com/The-use-of-matches-in-Guvnor-and-binded...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users