You forgot to escape the . ;-)DigitalVolcano wrote:This should work
RegexReplaceCode: Select all
.([0-9]{4})[0-9]{1,}
Try it in the regex testerCode: Select all
.$1
Search found 6 matches
- Thu Aug 27, 2015 10:16 am
- Forum: Regular Expressions (Archived)
- Topic: Replacing a number with the first four digits
- Replies: 2
- Views: 17965
Re: Replacing a number with the first four digits
- Mon Jul 20, 2015 12:46 pm
- Forum: Regular Expressions (Archived)
- Topic: Find 2 uses of <tagA>, without <tagB> between them
- Replies: 2
- Views: 20221
Re: Find 2 uses of <tagA>, without <tagB> between them
I know this is an old topic buy maybe you are still looking?
should to what you want. Not sure if it's efficient. On long texts it potentially has to look at the whole text...
Code: Select all
(<rev\w+>)(?=((?!<rev\w+>)[\d\D])*\1)
- Mon Jul 20, 2015 12:28 pm
- Forum: Regular Expressions (Archived)
- Topic: Replace Character with 5 numbers
- Replies: 1
- Views: 14090
Re: Replace Character with 5 numbers
Hi!
I can think of two ways to do it. I'll describe both, just for educational purposes :-D
1. Matching groups:
You can replace
[oO](\d\d\d\d\d)
with
N$1
Here $1 refers to the first expression in brackets...
2. Lookahead
Replace
[oO](?=\d\d\d\d\d)
with
N
This one tells it to find [oO ...
I can think of two ways to do it. I'll describe both, just for educational purposes :-D
1. Matching groups:
You can replace
[oO](\d\d\d\d\d)
with
N$1
Here $1 refers to the first expression in brackets...
2. Lookahead
Replace
[oO](?=\d\d\d\d\d)
with
N
This one tells it to find [oO ...
- Thu Jan 08, 2015 11:50 am
- Forum: TextCrawler
- Topic: tg free not searching files properly
- Replies: 3
- Views: 15597
Re: tg free not searching files properly
I'm not associated with the program so I might be wrong, but both pdf and doc don't necessarily show words they contain in a plaintext view. New docx is actually a zip file, which means there is compression at work. PDF also does some weird stuff. TG does not parse the file, it just opens them. So a ...
- Fri Dec 12, 2014 10:39 am
- Forum: TextCrawler
- Topic: Free vs Pro?
- Replies: 1
- Views: 15450
Free vs Pro?
Hi!
great fan of your software, I have the Pro version of Duplicate Cleaner and I often use TextCrawer to work on my extensive text collection...
I'm still using v2.5 cause last time I checked (been a while) there was only a pro version of 3... Now I noticed that there is also a free version of 3 ...
great fan of your software, I have the Pro version of Duplicate Cleaner and I often use TextCrawer to work on my extensive text collection...
I'm still using v2.5 cause last time I checked (been a while) there was only a pro version of 3... Now I noticed that there is also a free version of 3 ...
- Fri Dec 12, 2014 10:33 am
- Forum: Regular Expressions (Archived)
- Topic: How to replace with variable length characters?
- Replies: 2
- Views: 13643
Re: How to replace with variable length characters?
The easiest solution I can think of is this:
Replace
(?<=\do*)o
with
0
This uses the fact that you can ask what's in front of a place without having to match it. Therefore this matches all "o"s that have a digit followed by any amount of "o"s. Due to the fact that this \do+ is not actually ...
Replace
(?<=\do*)o
with
0
This uses the fact that you can ask what's in front of a place without having to match it. Therefore this matches all "o"s that have a digit followed by any amount of "o"s. Due to the fact that this \do+ is not actually ...