You are here: PSPad forum > English discussion forum > find first and last

find first and last

Goto Page: 1 2 3 Next

#1 find first and last

Posted by: maki | Date: 2020-05-12 13:22 | IP: IP Logged

Having 20 different numbers separated by a comma
2-digits 01 to 80
I want to find first and last
39 and 32
What regular expression?
39,...............,32

Not found, wrong regex
39([^,]+)32

Edited 3 time(s). Last edit at 2020-05-12 13:29 by maki.

Options: Reply | Quote | Up ^


#2 Re: find first and last

Posted by: pspad | Date: 2020-05-12 14:06 | IP: IP Logged

search: ^(\d+).*(\d+)$

you can use Copy button to put result into new file or replace with:
$1 $2

Options: Reply | Quote | Up ^


#3 Re: find first and last

Posted by: maki | Date: 2020-05-12 16:51 | IP: IP Logged

Invalid regular expression.
Again:
I just want to find the first and last number. Not replacement method!
And Do not open in a new document, working constantly on the current file and in the same window.

Edited 1 time(s). Last edit at 2020-05-12 16:52 by maki.

Options: Reply | Quote | Up ^


#4 Re: find first and last

Posted by: pspad | Date: 2020-05-12 17:24 | IP: IP Logged

If it write to you that regular expression is invalid, you are not able to use copy/paste. My regular expression is OK.

If you want to find first and then last in two steps, use this expression:
(^\d+|\d+$)

Options: Reply | Quote | Up ^


#5 Re: find first and last

Posted by: maki | Date: 2020-05-12 17:48 | IP: IP Logged

(^39|32$)

Wrong Find:
39,23,03,32
08,32

Edited 2 time(s). Last edit at 2020-05-12 17:51 by maki.

Options: Reply | Quote | Up ^


#6 Re: find first and last

Posted by: Professor Bernd | Date: 2020-05-13 03:56 | IP: IP Logged

@pspad

Why do you answer this impudent, disrespectful user, but do not answer me! Do I have to ask as disrespectfully as maki, or what should I do?

Options: Reply | Quote | Up ^


#7 Re: find first and last

Posted by: pspad | Date: 2020-05-13 04:12 | IP: IP Logged

Professor Bernd:
@pspad

Why do you answer this impudent, disrespectful user, but do not answer me! Do I have to ask as disrespectfully as maki, or what should I do?

I can answer you only that it will be implemented. All requests are put into queue.
In case your question is from the working in PSPad area, I will answer.
I got all forum adds into e-mail, don't be afraid, no add is lost.

As I remember, I already implemented few your requests.

Edited 2 time(s). Last edit at 2020-05-13 04:12 by pspad.

Options: Reply | Quote | Up ^


#8 Re: find first and last

Posted by: Professor Bernd | Date: 2020-05-13 05:26 | IP: IP Logged

Today is the 2020-05-13, my post "Highlighting all occurrences of selected text in the active editor" is from 2020-05-05, so more than 1 week old. You did not answer. But you answer maki almost every day. maki doesn't know the word "please", nor "thank you". I say: Please build my requested feature into PSPad, it is for all languages and many users will be happy!

Options: Reply | Quote | Up ^


#9 Re: find first and last

Posted by: pspad | Date: 2020-05-13 06:25 | IP: IP Logged

I understand, but it's not as easy as it can look.

Options: Reply | Quote | Up ^


#10 Re: find first and last

Posted by: Professor Bernd | Date: 2020-05-13 06:58 | IP: IP Logged

If you need help, I can help. I've been working on this feature for a long time and I'm sure I can help. For example with pseudo code that shows how to highlight all occurrences of marked text.

Options: Reply | Quote | Up ^


Goto Page: 1 2 3 Next





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