View Single Post
Old 01-27-2011, 05:46 PM   #4
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by kovidgoyal
Given that you can chain regexes with | I don't really see the need for more.
You can chain the search regex but you can't chain the replacement text. Chaining would only be useful in a limited number of circumstances such as removing content entirely.

Quote:
Originally Posted by duepixel View Post
Also, there is a bug in the regexp (maybe only in preview?): you can't use Start of string and end of string Anchors (http://www.regular-expressions.info/anchors.html)
^ and $ work fine for start and end of string. Remember that the start of the string is the first character in the regex preview. You probably want ^ and $ to work on lines. Look the (?iLmsux) flags section of the Python Re Syntax to enable this behavior.
user_none is offline   Reply With Quote