I created a camel.properties file and added the following entries:
version1.regex='^1.00(.)+'
version1.value=1.00
The I added a wiretap
<wireTap
uri="log:com.abcsupply.edelivery.pos.emailbroker?level=info">
<body><simple>**************${properties:version1.regex}</simple></body>
</wireTap>
and the output was as expected: '^1.00(.)+'
For some reason, still, the regex is not working whether the camel entry is
version1.regex='^1.00(.)+'
or
version1.regex=^1.00(.)+
So I tried a replacing /regex/ with /contains/ to see if that works:
<choice>
<when>
<simple>${in.body} contains
${properties:version1.value}</simple>
<wireTap uri="log:com.xx.yy.zz.aaa?level=info">
<body>
<simple>************** ROUTING TO A
:${body}</simple>
</body>
</wireTap>
<to ref="posEmailQueue" />
</when>
<otherwise>
<wireTap uri="log:com.xx.yy.zz.aaa?level=info">
<body>
<simple>************** ROUTING TO B:${body}
</simple>
</body>
</wireTap>
<to ref="mnuftgInctvQueue" />
</otherwise>
</choice>
and it worked. I'm wondering if the regex has a bug or if my brain has one
:-)
BTW: tried {{...}} with regex and that gave an error.
--
View this message in context:
http://camel.465427.n5.nabble.com/regex-pattern-derived-from-property-file-tp5769123p5769250.html
Sent from the Camel - Users mailing list archive at Nabble.com.