[
https://issues.apache.org/jira/browse/NIFI-604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14540603#comment-14540603
]
Ricky Saltzer commented on NIFI-604:
------------------------------------
Turns out that regex doesn't work in practice, instead we can use
{code}
"(?<=[^\\\\]);"
{code}
and then replace anything that's "\;" with just ";" after the split.
> ExecuteStreamCommand does not support arguments with semicolons
> ----------------------------------------------------------------
>
> Key: NIFI-604
> URL: https://issues.apache.org/jira/browse/NIFI-604
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Ricky Saltzer
>
> The following code in ExecuteStreamCommand assumes you're not passing
> semicolons within your argument. This is a problem for people who need to
> pass semicolons to the executing program as part of the argument.
> {code}
> 224 for (String arg : commandArguments.split(";")) {
> {code}
> To allow for escaped semicolons, I propose we change this to the following
> regex.
> {code}
> 224 for (String arg : commandArguments.split("[^\\];")) {
> {code}
> *or*... could we just change the way arguments are passed to make it more
> similar to how ExecuteCommand works? The whole semicolon per argument took
> some getting used to, and doesn't seem very intuitive.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)