You are here: PSPad forum > English discussion forum > Find line with specific first and last number

Find line with specific first and last number

Goto Page: Previous1 2 3 Next

#11 Re: find first and last

Posted by: pspad | Date: 2020-05-13 07:09 | IP: IP Logged

I know how to search for other occurences and highlight them, but in the on the fly highlighting event is made a lot of other things. I must do it and don't break existing functionality, I can't speed down drawing e.t.c.

Options: Reply | Quote | Up ^


#12 Re: find first and last

Posted by: maki | Date: 2020-05-15 14:55 | IP: IP Logged

I only want to find the specific first two numbers and even trying to match each regex fails. Why is everything that seems simple is complicated?
Not March regex:
(^39|32$([^0*([1-9]|[12][0-9]|3[0-8])|0*([4-7][0-9]|80)|0*([1-9]|[12][0-9]|3[01])|0*(3[3-9]|[4-7][0-9]|80)]))

Edited 1 time(s). Last edit at 2020-05-15 14:55 by maki.

Options: Reply | Quote | Up ^


#13 Re: find first and last

Posted by: pspad | Date: 2020-05-15 15:08 | IP: IP Logged

Example of real line you are looking for and result.
Learn how to write question.

Options: Reply | Quote | Up ^


#14 Re: find first and last

Posted by: maki | Date: 2020-05-15 16:10 | IP: IP Logged

Find: 58,21
and
20,50

Match:
58,61,23,46,20,25,74,29,09,12,03,64,44,15,11,24,45,73,37,21
20,44,69,80,26,16,23,09,36,76,37,61,58,21,49,04,08,28,10,50

Non-Match
58,61,23,46,20,25,74,29,09,12,50,64,44,15,11,24,45,73,37,28

Edited 5 time(s). Last edit at 2020-05-15 16:13 by maki.

Options: Reply | Quote | Up ^


#15 Re: find first and last

Posted by: pspad | Date: 2020-05-15 16:17 | IP: IP Logged

Are you looking for lines starting with 58 and ending with 21 or do you want to find first and last number?
Those things are different and you should know first what do you want.

When you look on start of this topic, you will find your request on the begin was totally different from your request now.

Options: Reply | Quote | Up ^


#16 Re: find first and last

Posted by: maki | Date: 2020-05-15 16:20 | IP: IP Logged

I just want to insert any numbers (first and last) and always ignore the second to nineteenth number.

Options: Reply | Quote | Up ^


#17 Re: find first and last

Posted by: pspad | Date: 2020-05-15 16:23 | IP: IP Logged

I don't understand you "insert numbers"
Try again from the begin and describe your problem complexly

Options: Reply | Quote | Up ^


#18 Re: find first and last

Posted by: maki | Date: 2020-05-15 16:30 | IP: IP Logged

The ones I'm looking
I say I want to find the first and last number.
Must match start and end.
If I enter e.g. 44,56
So I want to find all the lines that contain these numbers at the beginning and end.

Options: Reply | Quote | Up ^


#19 Re: find first and last

Posted by: pspad | Date: 2020-05-15 16:54 | IP: IP Logged

So I wil lreturn to my forst answer:
forum.pspad.com

Search: ^44.*56$
If you want to look for more pairs, use this: ^(58.*21|20.*50)$

Edited 1 time(s). Last edit at 2020-05-15 16:57 by pspad.

Options: Reply | Quote | Up ^


#20 Re: find first and last

Posted by: maki | Date: 2020-05-15 18:10 | IP: IP Logged

The expression is incorrect because it matches the whole string and should only mark 2 numbers!
Test: regex101.com

I need a macro script

Edited 3 time(s). Last edit at 2020-05-15 18:16 by maki.

Options: Reply | Quote | Up ^


Goto Page: Previous1 2 3 Next





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