Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 05-20-2013, 01:20 AM   #1
macnab69
Zealot
macnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toys
 
Posts: 109
Karma: 5754
Join Date: Jan 2012
Location: South Africa
Device: Kindle 4
Regex to insert word at beginning of a line

Want to change xxx xxxx, The to The xxx xxxx.

In the replace section, how do I specify at the beginning of the line?

Python reference speaks of ^ and \B, but how do I use them to stop them being appended to the end of the line?

If I make the replace regex \BThe or \B The it just appends at the end of the line. Somehow I am missing telling it: This is an escape sequence, not normal characters.

I always thought that if you want a \ you needed to use \\.
macnab69 is offline   Reply With Quote
Old 05-20-2013, 02:56 AM   #2
macnab69
Zealot
macnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toys
 
Posts: 109
Karma: 5754
Join Date: Jan 2012
Location: South Africa
Device: Kindle 4
Got it
Code:
(.*)(, )(The)
\3 \1
macnab69 is offline   Reply With Quote
 
Enthusiast
Reply

Tags
regex

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regex to search at beginning of line kakkalla Sigil 30 06-03-2013 03:08 PM
Regex Help - Add Book - Insert Filename into Custom Field nynaevelan Library Management 3 10-12-2011 01:14 PM
how to insert break-line schuster Recipes 1 05-24-2011 03:19 PM
Insert new line with regex deckoff Sigil 6 08-08-2010 11:24 AM
Fb2 Input (Do not insert a ToC at the beginning) Garfunkel Calibre 0 10-08-2009 01:49 PM


All times are GMT -4. The time now is 11:05 PM.


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