01-24-2020, 04:41 PM | #1 |
Member
Posts: 13
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. |
01-24-2020, 06:36 PM | #2 |
Well trained by Cats
Posts: 29,803
Karma: 54830978
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 07:10 PM |
Regex: Search and Replace | Thomas_AR | Calibre | 2 | 03-31-2016 06:23 PM |
regex search/replace - how to? | Alt68er | Sigil | 1 | 03-11-2014 08:53 PM |
Regex search and replace | dwlamb | Sigil | 6 | 04-12-2013 02:34 PM |
need regex help search and replace | schuster | Calibre | 4 | 01-10-2011 09:00 AM |