Add and Remove special char from a vendor name

Hi all , i am processing the invoice from that i extracted the vendor name to enter into an respective site, thing is i need to remove or add special characters on it , as per the pre-defined dumped value so that i can pick the respective vendor to go ahead!
eg . case 1:
from the invoice i got a vendor name like ADC Telecommunications, Inc. but in dumped value(say for an example excel data) am having like ADC Telecommunications Inc in this case i need to remove comma(,)&dot(.) from the value where i extracted!

case2:
extracted value from the invoice is Alcoa Inc but i in dumped value(say for an example excel data) am having like Alcoa.,Inc
in this case i want to adddot(.)&comma(,)

so how should i do this!
sometimes i need to add a spl char on it , sometimes i want to remove :frowning: can anyone share me the work flow to work on this !

Thanks
Naveen

adding the . or , is not possible i mean we can add but exactly at what position that need to add we can’t so when ever string contains the special characters remove .

for case 1 we can use this expression
if
str_input = ADC Telecommunications, Inc.
the
str_output = str_input.Replace(β€œ,”,β€œβ€).Replace(β€œ.”,β€œβ€).ToString
which will delete the . and ,

while
for case 2
if str_input = Alcoa Inc
then
str_output = Split(str_input," β€œ)(0)+”.,β€œ+Split(str_input,” ")(1)

this will add the ., before Inc

Cheers @naveen19

1 Like

let me try this & get u back @Palaniyappan thanks for a quick response

To remove ,.
String var=system.text.regularexpression.regex.replace(your variable,β€œ[.|,]”, β€œβ€)

To add
var=system.text.regularexpression.regex.replace(your variable,β€œInc”, β€œ.,Inc”)

Have a look ,might it will help

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.