How do I split a QStringList into more than one delimeter?

I am trying to use a function split()

inQStringList

I have a file like this;

41761505526;31.8
55201481028;69.5
26458795084;14.2
26410796678;29.4

      

I want to break these numbers;

    41761505526     31.8
    55201481028     69.5
    26458795084     14.2
    26410796678     29.4

      

However, I don't know how to use the split function with 2 delimeters.

If I use;

strList = str.split(";");

      

Then it will look like

    41761505526
31.855201481028
69.526458795084
14.226410796678
29.4

      

I used it str.split("\\W+");

, it works pretty well, but doesn't break (.) dat

char either . What is the most suitable way to split more than one division?

+3


source to share





All Articles