Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Replace All only for year before colon

Hi,
Below is my Input

Id,name,charac
1,fff, "a2018":"23"
2,hhdh,"a":"2019"
3,agdhs,"a":"2018"
4,hrjje, "a":"2019", "a2018": "atra"
5,jdjeh, "a2018": 2018-12, "b":2019

Need to replace any year with blank (no space) only before colon ( 0683p000009MACn.png in the column charac. Ni change of other columns. Charac data type is jason.

I have tried with replace all which is replacing all years after colon ( 0683p000009MACn.png also

My output should be as below:
Id,name,charac
1,fff, "a":"23"
2,hhdh,"a":"2019"
3,agdhs,"a":"2018"
4,hrjje, "a":"2019", "a": "atra"
5,jdjeh, "a": 2018-12, "b":2019

Please help me

Thanks,
Ram
Labels (1)
  • v7.x

2 Replies
Anonymous
Not applicable
Author

Hi,

 

I hope below solution will help you.

0683p000009M4Oe.png

 

0683p000009M4Ot.png

 

row1.line.replaceAll("[0-9][0-9][0-9][0-9]\":","\":") 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

Anonymous
Not applicable
Author

@nani22633 

 

Were you able to resolve your issue with the help of above post? If yes, could you please mark the topic as resolved? 

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂