You are here: PSPad forum > English discussion forum > Can I use Macro for this?

Can I use Macro for this?

#1 Can I use Macro for this?

Posted by: hlk123 | Date: 2016-10-19 12:24 | IP: IP Logged

Hello

I've a Textfile .. and a line looks something like this:

Chapter 12 - Adverbs ( 副词) ; 79

I want to delete the part "( 副词)" ... between the round brackets (or parentheses) .. plus the round brackets.
And I want to use Macro for that .. because there are many lines with a similar appearance.
Is it possible? How?
Thank you.

Options: Reply | Quote | Up ^


#2 Re: Can I use Macro for this?

Posted by: pspad | Date: 2016-10-19 12:34 | IP: IP Logged

It will be better to use regular expressions
search: (.*)(\(.*\))(.*)
replace: $1$3
[x]Regula expressions

explanation:
you split lines to 3 parts (round brackets) and in replace you will use substitution for first and third part only

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