07-19-2014, 01:52 PM | #1 |
eBook Junkie
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
Regex to remove the first 4 characters
Hi:
I did a search but I couldn't find an answer which I understood that will help me to remove the first four characters from a title. Any regex gurus out there willing to help me figure this out?? Pretty please. |
07-19-2014, 02:47 PM | #2 | |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
The {4} says exactly 4 of the preceeding |
|
Advert | |
|
07-19-2014, 06:26 PM | #3 |
Grand Sorcerer
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
If you know absolutely that you want to remove the first 4 characters no matter what they are then:
Search: ^....(.*) Replace: \1 Voila. The search regexp says "Anchored at the beginning, accept 4 of any character, then keep the rest in the first group". The replacement says "replace everything with the first group". The key to make this work is the "^", which says that the regexp *must* start at the beginning of the value. |
07-19-2014, 06:41 PM | #4 |
eBook Junkie
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
Thank you, that worked perfectly. You guys are the best!!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is there a way to remove text from Title with regex | LadyKate | Library Management | 8 | 02-14-2014 04:12 PM |
regex (.*) not liking hidden characters | cybmole | Sigil | 7 | 12-16-2012 06:44 PM |
Help with regex to remove specific strings of numbers | adrian1944 | Conversion | 9 | 02-14-2011 01:11 PM |
Regex help to remove HTML footer | neonbible | Calibre | 4 | 09-09-2010 09:42 AM |
Regex to remove header from PDF | neonbible | Calibre | 4 | 09-07-2010 10:08 AM |