You are here: PSPad forum > English discussion forum > Re: Odp: Jak wyszukiwać tylko liczby nieparzyste po przecinku?
Posted by: maki | Date: 2020-04-16 10:53 | IP: IP Logged
How can I search only for odd numbers after the decimal point?
Example:
1,4,7,27,56,78,79,80
Result:
1,7,27,79
Edited 1 time(s). Last edit at 2020-04-16 10:58 by maki.
Posted by: pspad | Date: 2020-04-16 11:24 | IP: IP Logged
Somethink like:
\d{0,}[13579]\,
use Copy button
Edited 1 time(s). Last edit at 2020-04-16 11:25 by pspad.
Posted by: pspad | Date: 2020-04-16 11:27 | IP: IP Logged
Or use different acces and replace with nothing non odd numbers
Posted by: maki | Date: 2020-04-16 12:24 | IP: IP Logged
Still not a perfect regex.
Not correct (not find 79)
11,12,13,79
Correct
11,12,13,79,80
Edited 1 time(s). Last edit at 2020-04-16 12:25 by maki.
Posted by: pspad | Date: 2020-04-16 13:11 | IP: IP Logged
Replace end with comma optional with end of line
Such easyb hings you should bd able to do yourself
Posted by: maki | Date: 2020-04-16 19:57 | IP: IP Logged
I have even more difficult problems to solve, how do I convert decimal numbers to integer numbers?
Example:
===========
11,63513513513514
Convert to:12
If 11.0xx blah blah - 11.49 blah blah
Convert = 11
==========================
If 11.51 blah blah - 11.99xxx blah blah
Convert = 12
So an integer (closest to an integer).
Posted by: pspad | Date: 2020-04-17 05:48 | IP: IP Logged
Scripting and use ROUND() function
What do you do isn't work for text editor.
Why don't you use some spreadsheet? Excel, OpenOffice, Libre Office...
Posted by: maki | Date: 2020-04-22 18:56 | IP: IP Logged
I'm not a programmer, and being a programmer is not hip-hop that you will master everything in one day, month, or year.
It's not like this: Do it, do that, search an google forum and you will know how to do it.
These commands tell me nothing and how to use them.
docs.microsoft.com
PSPad has no function: increase every number on the line by +1?
11 to 12
13 to 14
77 to 78
input:
12335,27
12336,17
12337,13
output
12335,28
12336,18
12337,14
Edited 1 time(s). Last edit at 2020-04-22 18:57 by maki.
Posted by: maki | Date: 2020-04-22 19:05 | IP: IP Logged
How to use Replacement Method in PSPad
Find:
(?=\d)(?:([0-8])(?=.*\1(\d)\d*$)|(?=.*(1)))(?:(9+)(?=.*(~))|)(?!\d)
Replace with: ???????????
Edited 1 time(s). Last edit at 2020-04-22 19:07 by maki.
Editor PSPad - freeware editor, © 2001 - 2025 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR