Hi all,
I went through a number tests until the moment when I have realised that the
problem seems to be dealing with phrase sentences with spaces, e.g. "Text
Again". Although the final version of my regex was still correct, as
follows:

[A-Z][A-Za-z]*\s[A-Z][A-Za-z]*

The pattern was not picked, therefore the replacement did not occur.

I have then modified my input value and that in the mapping file to hold a
"_" . The regular expression for the new pattern is:

"[A-Z][a-z]*_[A-Z][a-z]*"

and my mapping now looks like this:

"Text_Again" "New Text"

It now works because the input value coming from the Json file has an
underscore, instead of \s. The replacement value can have as many spaces or
special characters as you want, it does not matter. Can I run this by the
community and find out whether this is a known limitation of
ReplaceTextWithMapping? 

Thank you so much,

I. 



--
View this message in context: 
http://apache-nifi-developer-list.39713.n7.nabble.com/Issues-with-Regex-used-with-ReplaceTextWithMapping-where-am-I-going-wrong-tp10592p10598.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.

Reply via email to