Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Solved Is there principal difference between QRegularExpression and QRegExp?

    General and Desktop
    3
    3
    100
    Loading More Posts
    • 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.
    • B
      bogong last edited by bogong

      Hello!
      Which is better to use QRegularExpression and QRegExp? Is there principal difference between this two classes?

      1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by

        Hi
        You should use QRegularExpression
        Docs says
        Note: In Qt 5, the new QRegularExpression class provides a Perl compatible implementation of regular expressions and is recommended in place of QRegExp.

        So i guess the biggest difference is its compatibility

        1 Reply Last reply Reply Quote 6
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          QRegExp is a custom regular expression implementation.
          QRegularExpression uses PCRE as a backend.
          Also, QRegExp should be considered deprecated and not used in new code.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply Reply Quote 2
          • First post
            Last post