You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Charlie Frasure <ch...@gmail.com> on 2015/11/13 00:03:09 UTC

Expression language

This expression does not parse without error:
${literal('utf-8 utf-16 utf-16be utf-16le us-ascii
iso-8859-1'):contains(encoding)}

Is it not possible to use an attribute in a comparison function?
Unexpected token 'encoding' at line 1, column 73. Query: ${literal(utf-8
utf-16 utf-16be utf-16le us-ascii iso-8859-1):contains(encoding)}

Alternatively, I think a regex should work, but didn't immediately get a
match using:
${enconding.match('utf-8|utf-16|utf-16be|utf-16le|us-ascii|iso-8859-1')}

Charlie