I am a beginner in .Net and Drools.I am using Drools 3.0 for .Net Application. I am trying to parse data of a variable(Filed:- Subject/Body and Class : -EmailProperties).
Eg:- if Text = "Atal is a .Net Developer and trying for a parser." So I want 'parser' or '.Net' words as output.
I have searched on internet and I found that we can do it by using 'matches' keyword along with regular expression.For that I am using following Regular Expressions: -
rule "Hello"
when
//m: EmailProperties(Body.indexOf(".Net"))
//m: EmailProperties(Body matches "(?i)(?s)\w.*Developer.*")
// m: EmailProperties(Body matches "/^Developer$/")
// m: EmailProperties(Subject == "Open Position")
m: EmailProperties(Subject matches "/^Position$/")
then
EmailProperties.debugResult("Hello Brother This is testing for Rules Engine");
end
I followed following link:- regular expression for exact match of a word
Ques : -
1.. What I am doing wrong here?
2.. Is there any other way to achieve parsing using Drools with .Net?
3.. I am using Drools 3 for a .Net application. Do I need to take care about this thing whenever I write regular expression in .Net/Drools or it will be same for everywhere whether it is a java, .Net or any else application?? Does Regular Expressions differ with Technology.
Thanks!!