Milan,
Your regex, I think, is fine, but you're using the "matches" function, which
requires that the entire
value match the regex exactly. It appears that you're trying to check if the
value contains the regex
anywhere within it, so you'd want to use the "find" function instead:
${setabsolutepath:find('\/V9|12V')}
Thanks
-Mark
> On Jun 13, 2018, at 8:47 AM, Milan Das <[email protected]> wrote:
>
> Hello All,
>
> I am trying to use “RouteOnAttribute” on the following text attribute
> “/tmp/subdir/9/” with the expression
> ${setabsolutepath:matches('\\/9|12\\/')}
>
> I also tried without escape sequence ${setabsolutepath:matches('\/9|12\/')}
>
> Everytime it is getting routed to unmatched.
>
>
>
> Here is my regex
>
> https://regex101.com/r/kINhh9/1
>
>
>
>
>
> Can somebody help me if there is a silly mistake or some problem with the
> NIFI code?
>
>
>
> Regards,
>
> Milan
>