![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Oct 2012
Device: iPad
|
Search-and-Replace with a found number
Hi,
I tried to replace a situation in my text which need to get converted to MOBI: (any number at the end of the line following a <br>) need to get replaced with (the found number WITHOUT the <br> at the end of the line). I used the following search term: ((?P<zahl>[0-9])+ <br>) and the following replacement text: \g<zahl> Unfortunately it doesn't work as expected. As a result, always the last number of the whole string of numberstring (ie 1995 only the 5) will be found in the converted text at the end. I´m unsure where I made the mistake. Are somebody able to enlighten me here? Thanks a lot! |
![]() |
![]() |
![]() |
#2 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Oct 2012
Device: iPad
|
Hi,
do I talk about a feature which is not present at all or are nobody out there who are able to help?? If this is a non-present feature please inform me as well as help me if the goal is reachable somehow. Thanks a lot! |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
What format is your source file? Are the <br>'s in the source? Perhaps you could attach an example which shows the problem. I don't know mobi format but maybe the problem can be fixed at source so that it doesn't present itself to the conversion process.
|
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,876
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
does
Code:
((?P<zahl>[0-9]{4})+ <br>) I assume you want all (exactly) 4 digits |
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Oct 2012
Device: iPad
|
![]()
Hi
@Agama The Input format is PDF the export format is MOBI. The Place where I found the <br> is the 'middle', the interim format Calibre uses during convertion. I'm able to reach it in the convertion options 'search & replace' wizzard. Sorry that I let this unclear in my first post. @theducks Thanks for the hint but there are all varieties of digit counts. It may be only one digit or more (0...50000...xxxxxxxxxxx). So any number should be possible. Thanks a lot!!! |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
I think this should work:
Code:
((?P<zahl>[0-9]+) <br>) |
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Oct 2012
Device: iPad
|
Thanks a lot!
I am currently on vacation without my Computer but I'll try it as soon as possible and will come back with the result. Cheers |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Search and Replace | SOThunder | Conversion | 2 | 04-29-2012 08:29 AM |
search and replace with incremental number | pimpoum | General Discussions | 4 | 07-08-2011 02:41 PM |
search and replace - drops blanks in replace ? | cybmole | Conversion | 10 | 03-13-2011 03:07 AM |
Why no search and replace? | charleski | Sigil | 10 | 11-24-2009 04:13 PM |
I finally found a device to replace my Palm PDA | Nate the great | Alternative Devices | 50 | 12-10-2008 04:32 PM |