• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: NiFi regular expression for Update Attribute doesn’t work

Resolved: NiFi regular expression for Update Attribute doesn’t work

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

So I wanna replace all | ' " symbols in attribute. But this statement doesn’t work at all, it literally puts this text into value of attribute
I have suspicions that it has something to do with quotes, but i have no idea how to fix it.

Answer:

I believe since the delimiters are single quotes you’d need to either choose different ones, or escape the single quote you are trying to remove. Since [] creates a character class I shouldn’t need to | each character either. This should work:
${attribute:replaceAll('[|\'"]', ' ')}

If you have better answer, please add a comment about this, thank you!

regex
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to convert Java bytecode to Webassembly using CheerpJ compiler

24/03/2023

Resolved: Is pandas groupby() function always produce a DataFrame with the same order respect to the column we group by?

24/03/2023

Resolved: Kivy widget hierarchy not behaving as expected

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.