This is the string, there will be 2 splits happening
Split 1 on , and then i get header:data,
Split 2 on : i get header(0) and data(1)
now there are amounts like below = 19,50 , I would like to change the comma in that particular substring.
ExidQ:0810044262879,NaamQ:Bendt Van hoey,NomenclatuurQ:870100,InfoQ:Jeugd - speelpleinen (-19 jaar),BetaaldBedragQ:19,50,DagenQ:2,VerstrekkingDatumRuwQ:06112018,IndexQ:d9e2f2a4-4c2f-43f2-b955-422b7934dcd5.pdf,BronQ:AV_Upload,FileNameCSVQ:20181123
So “basically” i’m looking for a regex that changes the decimal from , to . no matter how many amounts in the string, no matter how big the string.
I don’t know, but have you tried something like this:
myVar = myVar.Replace(",",".")
Do you believe it will help you in this case?
When using string.replace you replace all “,” in the main string and that changes nothing
my first split is on “,” so when you change it the same "issue " occurs.
The regex to find all decimal numbers would probably be “\d,\d\d”.
If you want to replace all instances of that you can call Regex.Replace(input, “(?<=\d),(?=\d\d)”, “.”, …)
I see, please check @thediabloman response than.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.