Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 01-24-2020, 04:41 PM   #1
greenskye
Member
greenskye began at the beginning.
 
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.
greenskye is offline   Reply With Quote
Old 01-24-2020, 06:36 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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
theducks is offline   Reply With Quote
Advert
Reply


Forum Jump

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


All times are GMT -4. The time now is 01:22 AM.


MobileRead.com is a privately owned, operated and funded community.