naotosx
(Naoto)
August 24, 2018, 6:44pm
1
Hello i’m trying to use replace activity i have this variable amount = " 1.256.563" so it have a space and dots “.” so i tryed this
but just delete all content
i’d like to understand how to use this and with out using Replace Activity (amount.Replace([“.”," "], “”) i don’t know if this is ok but it’s just an example if you can guide me i’ll be thankful)
4 Likes
rkelchuri
(ER.Krishna)
August 24, 2018, 8:26pm
2
Here is the logic.
const string s = “Dot Net Perls is about Dot Net.”;
// We must assign the result to a variable.
// ... Every instance is replaced.
string v = s.Replace("Net", "Basket");
Output
Dot Net Perls is about Dot Net .
Dot Basket Perls is about Dot Basket .
4 Likes
balupad14
(Balamurugan)
August 24, 2018, 8:33pm
3
Hi @naotosx ,
To format the value in custom. you can use this activity.
I have created a custom activity to format the double and number values instead of using the code invoke. Using this activity you can able to format in any combination. It has 2 activities. One is for double value and another one is for integer. I Hope it will helpful .
Sample File : NumberFormatNuget.zip (2.2 KB)
[image]
[image]
Regards
Balamurugan
Regards
Balamurugan.S
1 Like
naotosx
(Naoto)
August 24, 2018, 8:38pm
4
Thanks @rkelchuri if i want to replace more than one character? is it possible in one setence ?
rkelchuri
(ER.Krishna)
August 24, 2018, 8:40pm
5
you have to take it into loop and replace different character in each cycle… that’s how you can build your own function like ReplaceAllGarbage() …
also try to use Nugget package specified by @balupad14 . That will address all your concerns.
1 Like
Sharaz.KM
(Sharaz KM)
September 9, 2019, 10:02am
6
Hi Naotos,
Just put “\.” instead of “.”
Please let me know whether this works for you or not
Thanks
1 Like
SachinS
(SachinS)
February 3, 2021, 2:59pm
9
Hi,
Please use the Pattern as “[^0-9]”
Thanks