Hi,

The placeholder will just be replaced by whatever the user input is, there
is no need to do those String operations.

In your dsl, copy your DRL and replace everything that is user input by
{keyword}. Nothing else has to be done.

Regards,
Frank


fiitkar wrote
> 
> Hello,
> 
> I have a problem how to define the proper regular expression in .dsl file,
> LHS part, when searching a string with a defined input character.
> 
> Before I used .drl file, the rule looks like:
> plan : Plan( item matches "S.*|.*[^#]S.*" ) - that's OK. So it matches an
> input with S, but not #S - that is not the point...
> 
> But how to define it in .dsl file?
> Keep in mind that character "S" comes from the user, so it have to be
> merged with my regular expression.
> 
> I tried it that way:
> [condition][]There is a Plan with item1 {inputCharacter}=$Plan : Plan(item
> matches {inputCharacter} + ".*|.*[^#]" + {inputCharacter} + ".*"  )
> 
> But I got compilation error: mismatched token ....
> So I want to create a regular expression using the input character.
> I use Drools 4.0.7
> 
> Regards,
> Peter
> 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Regular-expression-problem-in-dsl-tp3551037p3551706.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to