You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ravi kargam (JIRA)" <ji...@apache.org> on 2018/11/15 23:04:00 UTC

[jira] [Updated] (NIFI-5826) UpdateRecord processor throwing PatternSyntaxException

     [ https://issues.apache.org/jira/browse/NIFI-5826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ravi kargam updated NIFI-5826:
------------------------------
    Description: 
with replacement value strategy as Record Path Value,

I am trying to replace square bracket symbol *[* with parenthesis symbol *(* in my employeeName column in my csvReader structure with below syntax

replaceRegex(/employeeName, "[\[]", "(")

Processor is throwing following exception.

RecordPathException: java.util.regex.PatternSyntaxException: Unclosed character class near index 4 [\\[]

It worked fine with other special characters such as \{, }, <, >, ;, _, "

For double qoute ("), i had to use single escape character, for above listed other characters, worked fine without any escape character. Other folks in Nifi Slack tried \s, \d, \w, \. 

looks like non of them worked.

replace function worked for replacing [ and ]characters. didn't test any other characters.

Please address resolve the issue.

Regards,
Ravi

 

 

 

  was:
with replacement value strategy as Record Path Value,

I am trying to replace square bracket symbol *[* with parenthesis symbol *(* in my employeeName column in my csvReader structure with below syntax

replaceRegex(/employeeName, "[\\[]", "(")

Processor is throwing following exception.

RecordPathException: java.util.regex.PatternSyntaxException: Unclosed character class near index 4 [\\[]

It worked fine with other special characters such as \{, }, <, >, ;, _, "

For double qoute ("), i had to use single escape character, for above listed other characters, worked fine without any escape character. Other folks in Nifi Slack tried \s, \d, \w, \. 

looks like non of them worked.

replace function worked for replacing [ and ]characters. didn't test any other characters.

Please address resolve the issue.

Regards,
Ravi

 

 

 


> UpdateRecord processor throwing PatternSyntaxException
> ------------------------------------------------------
>
>                 Key: NIFI-5826
>                 URL: https://issues.apache.org/jira/browse/NIFI-5826
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.5.0
>         Environment: Nifi in docker container
>            Reporter: ravi kargam
>            Priority: Minor
>         Attachments: UpdateRecord_Config_Exception.JPG
>
>
> with replacement value strategy as Record Path Value,
> I am trying to replace square bracket symbol *[* with parenthesis symbol *(* in my employeeName column in my csvReader structure with below syntax
> replaceRegex(/employeeName, "[\[]", "(")
> Processor is throwing following exception.
> RecordPathException: java.util.regex.PatternSyntaxException: Unclosed character class near index 4 [\\[]
> It worked fine with other special characters such as \{, }, <, >, ;, _, "
> For double qoute ("), i had to use single escape character, for above listed other characters, worked fine without any escape character. Other folks in Nifi Slack tried \s, \d, \w, \. 
> looks like non of them worked.
> replace function worked for replacing [ and ]characters. didn't test any other characters.
> Please address resolve the issue.
> Regards,
> Ravi
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)