01-08-2017, 02:32 PM | #1 |
Village idiot
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
|
REGEX match everything before #
Hi all
I can't seem to get my regex right. I have a file with a lot of enumerations (if that's the correct translation). For example: 102 # blabla 103 # blabla 450 # blabla 499 # blabla I want to delete al the numbers AND the # and keep only the blabla Would something like this be right? Code:
.*(?##)# Thanks a lot! Last edited by JLius; 01-08-2017 at 02:53 PM. |
01-08-2017, 03:40 PM | #2 |
Well trained by Cats
Posts: 29,688
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Not tested
\d+\s\#\s(.+?) replace with \1 <the stuff after the #<space> |
01-08-2017, 04:25 PM | #3 |
Village idiot
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
|
Thank you, will try when mine fails (seems to be working at the moment though)
|
Tags |
regex |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Regex Search] Minimal match not possible? | nqk | Editor | 7 | 12-24-2014 03:19 AM |
how to have regex dot match any character including newline? | gnychis | Calibre | 5 | 11-30-2010 06:35 PM |
Need help with a conversion regex - can't match newline | ereader123 | Calibre | 2 | 03-29-2010 10:58 AM |