I’m just wondering how i can split a string by both front slashes (/) & backslashes (). So for example, these types of strings;
"X:/Blah/blah/"
"X:\Blah\blah\"
And also mixed slashes;
"X:/Blah\blah/"
Would work & in each case return:
“X:”, “Blah”, “blah”
I believe i will need to use a QRegExp, http://doc.qt.io/archives/qt-4.7/qregexp.html but i’m just not sure what character set i will need to use.
The regex needs two backslashes to prevent the backslash character from escaping the
]character, and C++ adds an additional two so that you’re passing in\literals.