Advertisement
Guest User

Untitled

a guest
Feb 28th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const QRegularExpression re("X([-+]?\\d*\\.?\\d+)\\s+Y([-+]?\\d*\\.?\\d+)");
  2. QTextStream in(&file);
  3. while(!in.atEnd()) {
  4.     QString line = in.readLine();
  5.     const QRegularExpressionMatch reMatch = re.match(line);
  6.     if(reMatch.hasMatch())
  7.         qDebug() << "X: " << reMatch.captured(1) << " Y: " << reMatch.captured(2);
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement