Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. regex replace

regex replace

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 924 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ravasR Offline
    ravasR Offline
    ravas
    wrote on last edited by
    #1

    Usually regex libraries have a replace or sub function;
    however, I could only find:
    QRegularExpression::swap
    QRegularExpressionMatch::swap

    Is swap used for this purpose? I couldn't find any examples, or figure it out.
    A basic example would be appreciated.

    ravasR 1 Reply Last reply
    0
    • ravasR ravas

      Usually regex libraries have a replace or sub function;
      however, I could only find:
      QRegularExpression::swap
      QRegularExpressionMatch::swap

      Is swap used for this purpose? I couldn't find any examples, or figure it out.
      A basic example would be appreciated.

      ravasR Offline
      ravasR Offline
      ravas
      wrote on last edited by ravas
      #2

      @ravas I found QString replace.

      replace(const QRegularExpression & re, const QString & after)
      http://doc.qt.io/qt-5/qstring.html#replace-13

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved