|
|
#1 |
|
Member
![]() Posts: 17
Karma: 10
Join Date: Feb 2010
Device: none
|
Freeze on search/replace regex
Trying to remove Author's Notes from the end of chapters using this regex:
\<p class\=\"calibre3\"\>*\<\/p\> \<hr class\=\"calibre1\"\/\>[\s\S]*(?=\<\/body\>) I'm leaving the replace field blank as I just want to erase this content. "Find" successfully selects the text I want. When I press "replace" the editor window freezes and must be force closed. Not sure what is happening. It seems like valid regex to me. |
|
|
|
|
|
#2 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,270
Karma: 61916422
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Nope
* or + are repetition QUANTIFIERS for the preceding pattern * is 0 or more occurrences + is 1 or more occurrences .+? is my favorite pattern ![]() the ? makes it less greedy |
|
|
|
| Advert | |
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Regex in search problems (NOT Search&Replace; the search bar) | lairdb | Calibre | 3 | 03-15-2017 08:10 PM |
| Regex: Search and Replace | Thomas_AR | Calibre | 2 | 03-31-2016 07:23 PM |
| regex search/replace - how to? | Alt68er | Sigil | 1 | 03-11-2014 09:53 PM |
| Regex search and replace | dwlamb | Sigil | 6 | 04-12-2013 03:34 PM |
| need regex help search and replace | schuster | Calibre | 4 | 01-10-2011 10:00 AM |