10-21-2017, 05:56 AM | #1 |
Zealot
Posts: 117
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
regex capitalize first letter
Hi, I’ve book with <p class:”body”>word even space</p> on each <p class> but i want (with search & replace with regex) replace every my p class with capitalize first letter <p class:”body”>Word even space</p>
How to this? Tanxs. Regards |
10-21-2017, 10:29 AM | #2 |
Well trained by Cats
Posts: 30,421
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
it might work better
<p class="body" Code:
<p class=”body”>([a-z]) Code:
<p class=”body”>\U\1\E |
Advert | |
|
10-21-2017, 11:47 AM | #3 |
Well trained by Cats
Posts: 30,421
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
It has been pointed out that this only works with a PCRE based S&R (Sigil)
PS you should use straight quotes in tags |
10-21-2017, 12:13 PM | #4 |
Resident Curmudgeon
Posts: 76,139
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
10-21-2017, 09:04 PM | #5 |
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
There are several Regex-functions to change the case of matched text. This is one of the modes for searching. "Capitalize text (ignore tags)" should do it.
|
Advert | |
|
10-22-2017, 12:52 PM | #6 |
Zealot
Posts: 117
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
@theducks: tanxs, now i try! PS i use calibre, not sigil!
@ davidfor: I’ve try regex capitalize text, but not work! On find i write <p class=“body”> and on regex i type on Capitalize text (ignore tags), then click on find, calibre find my p class but don’t capitalize my first word! Why? |
10-22-2017, 08:07 PM | #7 | |
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Code:
<p>Fred said, "this is some dialog Code:
<p>\w+ said, ("[[:lower:]]) I think that's what I did. I'm at work and can't look back through the search history to be sure. Or test it. |
|
10-23-2017, 04:44 AM | #8 |
Zealot
Posts: 117
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
Yeeesss, work! Tanxs to everybody!
|
10-23-2017, 12:04 PM | #9 |
Zealot
Posts: 117
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
With suggestion of theducks, capitalize word work better...my only forgetfulness is ([a-z]) on <p class=”body”> on find field!
Tanxs. Regards |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Capitalize first letter in custom column | mhbeyle | Library Management | 0 | 11-04-2016 10:18 AM |
Regex to find small letter followed by capital? | Vortex | Library Management | 2 | 03-18-2016 06:16 AM |
Regex problem: s&r adding space between emdash and first letter... | Witkacy | Sigil | 1 | 11-07-2014 03:35 PM |
Capitalize | CC-GoE | Library Management | 6 | 03-30-2014 07:05 AM |
Can I capitalize a letter? | Jorge Junior | ePub | 13 | 11-14-2012 10:30 PM |