Dear Chris,
Thanks for the reply......Please find the below code about how i used one of the syntax for my application.........
QRegExp rxlen
("(\\d+)(?:\\s*)([0-9]|[A-Z])");
int pos = rxlen.indexIn("Length: 1212AP");
if (pos > -1) {
QString value
= rxlen.
cap(1);
// "189" QString unit
= rxlen.
cap(2);
// "cm"
qDebug()<<value<<"The Value is";
qDebug()<<unit<<"The Unit is";
qDebug()<<uts<<"The Uts is";
QRegExp rxlen("(\\d+)(?:\\s*)([0-9]|[A-Z])");
int pos = rxlen.indexIn("Length: 1212AP");
if (pos > -1) {
QString value = rxlen.cap(1); // "189"
QString unit = rxlen.cap(2); // "cm"
QString uts = rxlen.cap(3);
qDebug()<<value<<"The Value is";
qDebug()<<unit<<"The Unit is";
qDebug()<<uts<<"The Uts is";
To copy to clipboard, switch view to plain text mode
Thanks in Advance.....Any solution would be appreciable........
Regards,
Bookmarks