D26435: [Syndication] Port QRegExp to QRegularExpression

Ahmad Samir noreply at phabricator.kde.org
Sun Jan 5 19:43:03 GMT 2020


ahmadsamir added inline comments.

INLINE COMMENTS

> dfaure wrote in loaderutil.cpp:69
> Indeed that `(?)` looks invalid. kregexpeditor says so, at least.
> 
> @mlaurent in commit dda15b0aaddec01 <https://phabricator.kde.org/R96:dda15b0aaddec01e31f862ba486a4e2876ab8eb8> you moved code around, but you also replaced `(?:HREF)` with `(?)`, while the rest of this regexp didn't change. Any reason for that?
> 
> I think that either HREF should be added back, or `(?)` should be removed.

The pattern is valid according to QRegularExpression::isValid(), and it seems to match sort of on word boundaries like \b and \B... weird :)

> dfaure wrote in tools.cpp:159
> Any reason for the added ? (for non-greedy-match)? I can't think of a case where it would make a difference, here.

Greedy matching would match:

<h1 style="display: block" some title in the the badly formatted header</h1>

so, it'll remove the whole string from < to the last >.

REPOSITORY
  R96 PIM: Syndication Support

REVISION DETAIL
  https://phabricator.kde.org/D26435

To: ahmadsamir, dfaure, mlaurent
Cc: kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200105/8f4f1200/attachment.html>


More information about the kde-pim mailing list