|
|
#1 |
|
Zealot
![]() Posts: 124
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 |
|
|
|
|
|
#2 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,238
Karma: 61360164
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 |
|
|
|
|
|
#3 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,238
Karma: 61360164
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 |
|
|
|
|
|
#4 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,594
Karma: 150249619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
|
|
|
|
|
#5 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
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.
|
|
|
|
|
|
#6 |
|
Zealot
![]() Posts: 124
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? |
|
|
|
|
|
#7 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
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. |
|
|
|
|
|
|
#8 |
|
Zealot
![]() Posts: 124
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
Yeeesss, work! Tanxs to everybody!
|
|
|
|
|
|
#9 |
|
Zealot
![]() Posts: 124
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 |