problem with online quotes/regexps in KMyMoney 5.0.5

Geza Giedke geza.giedke at gmail.com
Sat Aug 3 18:41:16 BST 2019


Hello,

after an upgrade from 4.8.2. to 5.0.5 (while moving from openSUSE 42.3
to 15.1) my online quotes do not work anymore ("Unable to update price
for PFE.FRA (no price or no date)") nor can I get any of the default
sites for quotes to work.

There must be some mistake in the regexps I'm using, but I can't find
it (and when I tried them out at the RegExp tester
(http://myregexp.com/) they did work. Any help would be appreciated.
Maybe someone on this list can spot the mistake - I would be very
grateful.

I would like to continue using the data provided by FT, e.g.,
https://markets.ft.com/data/equities/tearsheet/summary?s=PFE:FRA

The page contains the price in the form

Price (EUR)</span><span class="mod-ui-data-list__value">34.40</span>

which I used to to match with

Price\\s\\(\\w+\\)</span><span
class="mod-ui-data-list__value">(\\d?\\,?\\d+\\.\\d+)</span>

(I used double \\ because of the explanation "To include a \ in a
regexp, enter it twice, i.e. \\. To match the backslash character
itself, enter it four times, i.e. \\\\." given on the QtRegExp-Help
page (https://doc.qt.io/archives/qt-4.8/qregexp.html#code-examples),
but I also tried out several variants of the above without doubling
the backslashes (since the default entries in KMyMoney use single
slashes only) such as:

Price \(EUR\)</span><span class="mod-ui-data-list__value">([\d, ]+\.\d+)

but the result is always the same. To see that I can match at least
something, I tried

utf-(\d)

which then indeed gives "8" -- the only "expected" result I could produce.

The date comes as

as of Aug 02 2019 17:04 BST.</div>

which I used to match with

as of (\\w+\\s\\d+\\s\\d+)\\s\\d+:\\d+\\sBST

or with

as of (\w+ \d+ \d+)

But now I always get "(no price or no date)". What am I doing wrong?

The new KMyMoney also seems to require to extract the identifier from
the file (which seems weird since it's already used to identify the
file); I use

/data/equities/tearsheet/charts\?s=(\w+:\w+)

for this; when I leave the corresponding line empty The response
changes slightly, including also a "Identifier found: ''"
before the "(no price or no date)" line.

Is there some way in which I can see/debug how the RegExp I'm using is
being matched?

Thanks a lot for your time and help.

best regards
 Geza


More information about the KMyMoney mailing list