message: qt, test: use regex search in apptests
  use the FindInConsole function to regex search for values in apptests instead of Univalue read.
diff: #include <qt/rpcconsole.h>
  #include <shutdown.h>
  #include <test/util/setup_common.h>
  -#include <univalue.h>
  #include <validation.h>
  #if defined(HAVE_CONFIG_H)
  #include <QRegularExpression>
  #include <QScopedPointer>
  #include <QSignalSpy>
  +#include <QString>
  #include <QTest>
  #include <QTextEdit>
  #include <QtGlobal>
  @@ -49,10 +49,9 @@ void TestRpcCommand(RPCConsole* console)
  QTest::keyClick(lineEdit, Qt::Key_Return);
  QVERIFY(mw_spy.wait(1000));
  QCOMPARE(mw_spy.count(), 4);
  - QString output = messagesWidget->toPlainText();
  - UniValue value;
  - value.read(output.right(output.size() - output.lastIndexOf(QChar::ObjectReplacementCharacter) - 1).toStdString());
  - QCOMPARE(value["chain"].get_str(), std::string("regtest"));
  + const QString output = messagesWidget->toPlainText();
  + const QString pattern = QStringLiteral("\"chain\": \"(\\w+)\"");
  + QCOMPARE(FindInConsole(output, pattern), QString("regtest"));
  }
  } // namespace
  