WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: kle2 on April 24, 2025, 12:20:19 PM

Title: remove commas from a string
Post by: kle2 on April 24, 2025, 12:20:19 PM
Hello everyone,

I have a string below pulling from a csv file.

str = '1,568,582.27'

Is there a simple function that I can use to remove all commas in it so it becomes

str = '1568582.27'

Thank you,
kle2

Found a this function works great: StrReplace(str, ",", "")
Title: Re: remove commas from a string
Post by: td on April 24, 2025, 01:12:42 PM
The best questions are the self-answered ones.
Title: Re: remove commas from a string
Post by: guuzendesu on April 25, 2025, 02:20:40 AM
The StrClean function will work for that as well, and other characters at the same time.