You are here: PSPad forum > English discussion forum > delete a text file all drive letters

delete a text file all drive letters

#1 delete a text file all drive letters

Posted by: maki | Date: 2014-12-30 19:15 | IP: IP Logged

how to delete a text file all drive letters

example:
C:\My Documents\.....
D:\name....
remove only all letter
C:\
D:\
E:\
...
Z:\

etc.

Edited 2 time(s). Last edit at 2014-12-30 19:16 by maki.

Options: Reply | Quote | Up ^


#2 Re: delete a text file all drive letters

Posted by: pspad | Date: 2014-12-30 19:32 | IP: IP Logged

You looks you are very lazy boy. After all advices related to regular expressions you should be able to have some basics sad smiley

Search: ^\w\:\\
Replace:
[x]Regular expressions

Options: Reply | Quote | Up ^


#3 Re: delete a text file all drive letters

Posted by: maki | Date: 2015-01-01 15:50 | IP: IP Logged

Not work Regex grinning smileygrinning smiley

image

Options: Reply | Quote | Up ^


#4 Re: delete a text file all drive letters

Posted by: Stefan | Date: 2015-01-01 16:45 | IP: IP Logged

 
If the drive letter is NOT at begin of line, better use

Search: \w:\\
Replace:
[x]Regular expressions

instead. 

 

--
Stefan (pleased user since 1722)
Do you know you can spend Jan a beer? (click here)
Inofficial FAQs + Infos + Special Settings

Edited 1 time(s). Last edit at 2015-01-01 16:47 by Stefan.

Options: Reply | Quote | Up ^


#5 Re: delete a text file all drive letters

Posted by: pspad | Date: 2015-01-01 16:50 | IP: IP Logged

maki:
Not work Regex grinning smileygrinning smiley

I am working with examples you provided. If your lines are different in the real, it's your problem, not mine. Test my answer with example you gave me, then answer it's not working.

I think you make a fun of us. Maybe will be better spend time with something more useful, than waste it with answer of your topics, right?

My regular expression works with your screenshot:
c:\12345

Edited 1 time(s). Last edit at 2015-01-01 16:52 by pspad.

Options: Reply | Quote | Up ^


#6 Re: delete a text file all drive letters

Posted by: maki | Date: 2015-01-01 16:51 | IP: IP Logged

Stefan - Now it works finesmiling smiley

Edited 3 time(s). Last edit at 2015-01-01 16:57 by maki.

Options: Reply | Quote | Up ^


#7 Re: delete a text file all drive letters

Posted by: pspad | Date: 2015-01-01 16:57 | IP: IP Logged

It means Maki, your path doesn't start on the begin of line. Why do you give us example where line start with drive?

Options: Reply | Quote | Up ^


#8 Re: delete a text file all drive letters

Posted by: maki | Date: 2015-01-01 17:02 | IP: IP Logged

pspad - Yes, it works your regex. Sorry. I do not know why I always adds an empty line(space)

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR