You are here: PSPad forum > English discussion forum > regex
Posted by: maki | Date: 2014-09-22 08:00 | IP: IP Logged
E:\DOKUM 2\102_0\-Zui53f_-aW6aU.txt -> D:\dokum ko 2\101_0\-Zui53f_-W6aU.txt - Kopiowanie zakończone powodzeniem
^.*?(->) (left side)
....... (right side???)
Posted by: pspad | Date: 2014-09-22 09:00 | IP: IP Logged
We see the original line. What should be result? You want to search something or replace something or?
Posted by: maki | Date: 2014-09-22 10:08 | IP: IP Logged
I want to delete the right side*
LEFT -> RIGHT*
Edited 1 time(s). Last edit at 2014-09-22 10:08 by maki.
Posted by: pspad | Date: 2014-09-22 11:52 | IP: IP Logged
Search: \s\-\>.*
replace:
replace with nothing will delete your right side
Posted by: maki | Date: 2014-09-22 12:08 | IP: IP Logged
Incorrect regex - should be without find "->" (RIGHT)
"->" (only LEFT)
Edited 1 time(s). Last edit at 2014-09-22 12:09 by maki.
Posted by: pspad | Date: 2014-09-22 12:19 | IP: IP Logged
Wasted time again and again
Original line:
E:\DOKUM 2\102_0\-Zui53f_-aW6aU.txt -> D:\dokum ko 2\101_0\-Zui53f_-W6aU.txt - Kopiowanie zakończone powodzeniem
result should be:
E:\DOKUM 2\102_0\-Zui53f_-aW6aU.txt
or result should be:
E:\DOKUM 2\102_0\-Zui53f_-aW6aU.txt ->
Posted by: maki | Date: 2014-09-22 12:24 | IP: IP Logged
(LEFT SIDE) ^.*?(->) (post#1)
E:\DOKUM 2\102_0\-Zui53f_-aW6aU.txt ->
(RIGHT SIDE) (example regex find?)
D:\dokum ko 2\101_0\-Zui53f_-W6aU.txt - Kopiowanie zakończone powodzeniem
Edited 4 time(s). Last edit at 2014-09-22 12:26 by maki.
Posted by: pspad | Date: 2014-09-22 13:18 | IP: IP Logged
You wrote you want to delete right side.
If you want to keep -> use this expression:
Search: (\s\-\>).*
Replace: $1
Posted by: maki | Date: 2014-09-22 16:20 | IP: IP Logged
Other regex:
Find: 00 OR 000
59854321_00
984321_000
Not Find: 0
565343_0
(\d+)_......
Edited 2 time(s). Last edit at 2014-09-22 16:29 by maki.
Posted by: pspad | Date: 2014-09-22 16:48 | IP: IP Logged
Search for: \d+_0{2,3}
It means any count of digits, folllowed by underscore, followed by 2-3 zeroes
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