Hello,
at first, sorry for my bad english. But I try it anyway. I want to search for a word and delete the entire row in which it occurs. So far I have used it with another program and used this command: " ^.*,XX.*\R " (XX indicates that searching word). But this does not work with TextCrawler because "\R" is not recognized. Is there another way?
Thank you in advance, Torsten
Delete entire rows
- DigitalVolcano
- Site Admin
- Posts: 1863
- Joined: Thu Jun 09, 2011 10:04 am
Re: Delete entire rows
This works (lower case r):
You need the 'multi line anchors' option checked as well.
Code: Select all
^.*,XX.*\r
Re: Delete entire rows
Ok, thank you for the quick reply, I will try it.
Torsten
Torsten
Re: Delete entire rows
In regular expression tester it works very well. "^.*,XX.*\r\n" brings the correct result (,XX indicates that searching word). But not in the main window. Here is the message: No matches found. In both cases, I have the same settings. Is this a bug or what could I have done wrong?
Torsten
Torsten
- DigitalVolcano
- Site Admin
- Posts: 1863
- Joined: Thu Jun 09, 2011 10:04 am
Re: Delete entire rows
Does your file not have CR/LF line endings? That could cause no matches with that expression. You can swap the \r\n for $ to indicate any line ending - then it will work on all files.
Also make sure that 'Multi line anchors' is checked.
Also make sure that 'Multi line anchors' is checked.
Re: Delete entire rows
Here are three lines as an example:
S50ARX,S5,EU,3525.5,80m,PA4N,PA,EU,CQ,30,2012-08-25 00:00:00,25,CW
G0PZA,G,EU,3525.5,80m,PA4N,PA,EU,CQ,16,2012-08-25 00:00:01,25,BPSK
VE2WU,VE,NA,14019.3,20m,YO2BBX,YO,EU,CQ,25,2012-08-25 00:00:01,19,CW
Each line with ",CW" should be deleted. With "$" does not work. The lines are indeed empty, but still present. The line must be properly deleted, including any spaces.
Thanks for the help.
Torsten
S50ARX,S5,EU,3525.5,80m,PA4N,PA,EU,CQ,30,2012-08-25 00:00:00,25,CW
G0PZA,G,EU,3525.5,80m,PA4N,PA,EU,CQ,16,2012-08-25 00:00:01,25,BPSK
VE2WU,VE,NA,14019.3,20m,YO2BBX,YO,EU,CQ,25,2012-08-25 00:00:01,19,CW
Each line with ",CW" should be deleted. With "$" does not work. The lines are indeed empty, but still present. The line must be properly deleted, including any spaces.
Thanks for the help.
Torsten
Re: Delete entire rows
I've got it. With "^.*,CW.*\n" it worked. How can I delete the last empty line?
Torsten
Torsten
- DigitalVolcano
- Site Admin
- Posts: 1863
- Joined: Thu Jun 09, 2011 10:04 am
Re: Delete entire rows
(\n|$) maybe? That will match end of line or end of file.