Member since
06-29-2020
1
Post
0
Kudos Received
0
Solutions
06-29-2020
02:03 PM
I have a file that can contain a variable number of dates in the format ddHHmm:ssMMMYY and I want to change them to yyy/MM/dd HH:mm:ss. I currently have an ExtractText processor with property field date with a value of (\d{6}:\d{2}[a-zA-Z]{3}\d{2}) and I have Enable repeating capture group set to true. This is then sent to a ReplaceText processor that searches the same regex (\d{6}:\d{2}[a-zA-Z]{3}\d{2}) and replaces it with ${date:toDate("ddHHmm:ssMMMyy"):format("yyyy/MM/dd HH:mm:ss")} My problem is that it that the ReplaceText processor will replace every match with only the first result from the ExtractText processor instead of its respective date-time. This results in all the dates and times in the file being exactly the same.
... View more
Labels:
- Labels:
-
Apache NiFi