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
c ++ split qt qstring qregexp


source to share


No one has answered this question yet

Check out similar questions:

23498
Why is processing a sorted array faster than processing an unsorted array?
2873
How do I iterate over the words of a string?
2416
How do you set, clear, and switch one bit?
2116
Why are stigmental additions much faster in individual cycles than in combined cycles?
2030
How do you split a list into uniformly sized chunks?
1835
How to split a string at delimiter in Bash?
1675
Why is reading lines from stdin much slower in C ++ than Python?
1518
Image processing: improvement of the algorithm for the recognition of "Coca-Cola Can"
1483
Why should I use a pointer and not the object itself?
1466
Is <faster than <=?



All Articles
Loading...
X
Show
Funny
Dev
Pics