remove lines containing 1-3 digits, - and . only
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
remove lines containing 1-3 digits, - and . only
Hi, can you please tell me how to remove lines from a text file that are 1 to 3,- or . ONLY using easypattern please?
For example, if the text file contained:
1red
123green
1
190blue
23
001z
989
a112
1-2
45.5
green1.1
1.0
11.0
22-9
454.-
1-orange
1.014
1 green
1.0 blue
123 aa
a123
aa 123
111.
111.yellow
111 yellow
1d
24.2
999.0
67-8
-68.
After removing it would look like:
1red
123green
190blue
001z
a112
green1.1
1-orange
1.014
1 green
1.0 blue
123 aa
a123
aa 123
111.yellow
111 yellow
1d
999.0
Thank you,
Glenn.
For example, if the text file contained:
1red
123green
1
190blue
23
001z
989
a112
1-2
45.5
green1.1
1.0
11.0
22-9
454.-
1-orange
1.014
1 green
1.0 blue
123 aa
a123
aa 123
111.
111.yellow
111 yellow
1d
24.2
999.0
67-8
-68.
After removing it would look like:
1red
123green
190blue
001z
a112
green1.1
1-orange
1.014
1 green
1.0 blue
123 aa
a123
aa 123
111.yellow
111 yellow
1d
999.0
Thank you,
Glenn.
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: remove lines containing 1-3 digits, - and . only
Ok, use Filters\Remove\Remove lines\Remove matching lines
with a pattern of
If you also want to keep lines with 999.0 then you'll need to mark them in another way first.
Let me know if you need help with that
with a pattern of
Code: Select all
[ lineStart, 1+ (digits or period or hyphen or comma), lineEnd ]
Let me know if you need help with that
Re: remove lines containing 1-3 digits, - and . only
Thank you very much,
I'll try it soon and let you know.
Regards.
I'll try it soon and let you know.
Regards.
Re: remove lines containing 1-3 digits, - and . only
Hi again,
I tried adding the filter as you suggested, but the lines I am trying to remove are still there.
Anything else you can think of I could try please?
Thank you.
I tried adding the filter as you suggested, but the lines I am trying to remove are still there.
Anything else you can think of I could try please?
Thank you.
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: remove lines containing 1-3 digits, - and . only
Please email me the filter you designed and I can check it for you. Sorry - 14 minutes of battery life left in an airport lounge - can't do it for you!
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: remove lines containing 1-3 digits, - and . only
Please email me the filter you designed and I can check it for you. Sorry - 14 minutes of battery life left in an airport lounge - can't do it for you!
Re: remove lines containing 1-3 digits, - and . only
Hi,
I appreciate you taking the time whilst in an airport lounge, amazing!
I was disabling filters from my filter list ready to send you (I have one filter list and enable/disable filters as I need) and thought I'd give it one more run before sending it - and it worked fine. Sorry for confusion.
When you have time (not necessarily mid flight, hehe), could you tell me whether it is possible to put a character limit of say 5 on the filter? So any lines containing more than 5 characters are NOT removed (even if the line consists of just numbers, periods, hyphens and commas).
Thank you so much.
I appreciate you taking the time whilst in an airport lounge, amazing!
I was disabling filters from my filter list ready to send you (I have one filter list and enable/disable filters as I need) and thought I'd give it one more run before sending it - and it worked fine. Sorry for confusion.
When you have time (not necessarily mid flight, hehe), could you tell me whether it is possible to put a character limit of say 5 on the filter? So any lines containing more than 5 characters are NOT removed (even if the line consists of just numbers, periods, hyphens and commas).
Thank you so much.
Re: remove lines containing 1-3 digits, - and . only
Hi again,
Please ignore the above, I think I've done it:
Seems to be working for me.
Thanks you so much again for your help.
Regards.
Please ignore the above, I think I've done it:
Code: Select all
[ lineStart, 1-4 (digits or period or hyphen or comma or space), lineEnd ]
Thanks you so much again for your help.
Regards.
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: remove lines containing 1-3 digits, - and . only
Hi Glenn - no problem at all! It was a 23 hour flight, and Emirates wifi during the flight was a bit slow. Although the fact that they had wifi at all was pretty amazing!