Here is a sample of a file.
File is divided into a section called: case "some_number"
As you can see numbers are set randomly.
What I need to achive is to sort all case sections beginning from the lowest to highest, so case "4" is 1st; case "111" is 2nd and case "309" is 3rd.
The problem is that content of each case sections must be kept.
Is this possible ?
Code:
case "309": ### - asdasdscxczx
@string_1 = "irgoirhgoi;rhgv;rhg;rdsh;sdhfkjdsbhjbdjsv"
@string_2 = @Mafda + @Aasdant + @asdsas
string_3($*) # #$lslslslslsr,$psdfdsfgsdfdsfdste
$string_4
case "4": ### - fgvbfdvcxvcx
@string_1 = "asdsadefesdvfgwegfvrds"
@string_2 = @ssfMsdfdsa + @asdsadsant + @dfdsgrgrv
string_3($*) # #$asdfdsafsadsaadwfcedsfefcerc
$string_4
case "111": ### - fgfb vrdsadsadxca
@string_1 = "irgoirhgoi;rhgv;rhg;rdsh;sdhfkjdsbhjbdjsv"
@string_2 = @Mafda + @Aasdant + @asdsas
string_3($*) # #sadsdsadslslsr,$pasdasdsasdsxa
$string_4