-1

I have a string like this

";;;Caption=C:;FreeSpace=103571001344;Size=162527178752;;;Caption=D:;FreeSpace=129889742848;Size=336805752832;;;Caption=V:;FreeSpace=516807241728;Size=1000207282176;;;;

How can I extract each partition data into a variable so that I obtain something like this:

partition_1:='Caption=C:;FreeSpace=103571001344;Size=162527178752';
partition_2:='Caption=D:;FreeSpace=129889742848;Size=336805752832';
partition_n:='Caption=V:;FreeSpace=516807241728;Size=1000207282176';

Thank you!

user2858981
  • 235
  • 4
  • 26
  • 1
    Possible duplicate of [How to split string by a multi-character delimiter?](https://stackoverflow.com/questions/15424293/how-to-split-string-by-a-multi-character-delimiter) – David Heffernan Aug 14 '17 at 16:05

1 Answers1

2

This question applies to you as well. Basically, use TStringList, set LineBreak property to 3 semicolons (;;;) and Text property to your string.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
CynicalSection
  • 694
  • 4
  • 8