![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
![]()
Hi friends:
I have something like: Code:
<h1 title="My Title">C H A P T E R 1</h1> Code:
<h1 title="My Title">CHAPTER 1</h1> TIA Rubén |
![]() |
![]() |
![]() |
#2 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 168
Karma: 10010
Join Date: Oct 2018
Device: Tolino/PRS 650/Tablet
|
Depends. It can be impossible or very easy. If its always the word CHAPTER, tats easy, and i guess you woudn't have asked
![]() If all letters are capital you can just search for ([A-Z])_ and reaplce it with \1. The probality that a capital letter is followed by a blank is low, but not 0. So yo have to go through the text one at a time to make a decision. In any other case i would assume its not possible as Regex in sigil cant be limited to work only inside a specific element (AFAIR Calibre can do that) So you are catching too many wrong positives if your heading is mixed-case. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,878
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Simply add that element to the reflex pattern if you only want to search inside a specific tag element
|
![]() |
![]() |
![]() |
#4 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() Quote:
Quote:
Last edited by RbnJrg; 06-06-2021 at 03:22 PM. |
|||
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
@RbnJrg,
This is stretching my limited regex lookahead knowledge ![]() Code:
Find:\b([a-z])\s+(?=(\w\s+\w)) Replace:\1 I think you'd need to replace them one-by-one not 'Replace All'. Last edited by jackie_w; 12-13-2018 at 11:39 AM. |
![]() |
![]() |
![]() |
#7 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,626
Karma: 23190435
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
|
|
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() Code:
C H A P T E R V I I I Code:
CHAPTERVII I |
|
![]() |
![]() |
![]() |
#9 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#10 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
|
![]() |
![]() |
![]() |
#11 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 168
Karma: 10010
Join Date: Oct 2018
Device: Tolino/PRS 650/Tablet
|
By the was, are there any other spaces besides blank spaces?
|
![]() |
![]() |
![]() |
#12 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
![]() |
![]() |
![]() |
#13 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 168
Karma: 10010
Join Date: Oct 2018
Device: Tolino/PRS 650/Tablet
|
I would like to have seven red lines, some painted with red ink, some with green ink and some with transparent ink.
"The experts, Youtube" |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Writing spaces for regex | roger64 | Sigil | 10 | 12-05-2017 09:26 PM |
regex - issue with spaces? | cybmole | Editor | 43 | 12-31-2013 12:49 PM |
How to remove blank spaces? | Mamaijee | Conversion | 2 | 04-09-2013 11:20 AM |
Blank spaces after header is removed | Mamaijee | Conversion | 2 | 05-26-2011 01:17 PM |
Missing blank spaces in ToC | richough3 | ePub | 3 | 09-10-2009 05:33 PM |