problem with captured group replacement in search/replace
Bug #1903987 reported by
capink
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Invalid
|
Undecided
|
Unassigned |
Bug Description
using calibre 5.4.1 I tried the following search/replace
search field: title
search for: (.*)
replace with: \1 _ append to title
search mode: regular expression
mode: replace field
the result for the above search is as follows:
title: a > title: a _append to title _ append to title
When I tried the same search/replace in calibre 4.23 it gave me the expected result:
title: a > title: a _append to title
I attached a screenshot to demonstrate the error.
To post a comment you must log in.
yes the behavior of .* is different in python 2 and 3. Use .+ instead.
status invalid