I have the following string:
string input = " 2 1";
It is 2 spaces
followed by a 2
and then 2 more spaces
followed by a 1
. I want to do a replace on it, but I only want to replace the spaces between the 2
and the 1
with 0's and I do not want to use RegEx if possible?
The end result should look like this:
string result = " 2001";
20 340400 1
- 20-34-04-00-00001.0-0000.00
20 340400 500
- 20-34-04-00-00500.0-0000.00
20 340900 C
- 20-34-09-00-0000C.0-0000.00
20 3435OG 1 1
- 20-34-35-OG-00001.0-0001.00
20 3435OG 2 10
- 20-34-35-OG-00002.0-0010.00
20 3435OG A
- 20-34-35-OG-0000A.0-0000.00
20 3436AA 1 4A
- 20-34-36-AA-00001.0-0004.A
20 3436AA 2 10B
- 20-34-36-AA-00002.0-0010.B
20 353100 268
- 20-35-31-00-00268.0-0000.00
20G3402AI 1 401
- 20G-34-02-AI-00001.0-0004.01
20G3403AI 7 1
- 20G-34-03-AI-00007.0-0001.00
20G3416MK 1701
- 20G-34-16-MK-00000.0-0017.01
21 3410OM 148
- 21-34-10-OM-00000.0-0147.00
A few things I have noticed is that the first 4 parts are put together, most of the spaces and decimals are removed. I have had success without regex in most cases, but it fails for some.