You are here: PSPad forum > English discussion forum > Re: How do I count lines that match a regex?

Re: How do I count lines that match a regex?

#1 How do I count lines that match a regex?

Posted by: therium | Date: 08/16/2017 16:43 | IP: IP Logged

I have PSPad 4.6.2 on Windows 7 Pro. I don't have a wc program so how can I use PSPad to count the lines in a plain text file that begin with '\d+\.'?

If this feature does not exist, can you add it?

Thank you! Great program BTW.

Edited 1 time(s). Last edit at 08/16/2017 16:45 by therium.

Options: Reply | Quote | Up ^


#2 Re: How do I count lines that match a regex?

Posted by: vbr | Date: 08/16/2017 19:18 | IP: IP Logged

therium:
I have PSPad 4.6.2 on Windows 7 Pro. I don't have a wc program so how can I use PSPad to count the lines in a plain text file that begin with '\d+\.'?

Hi, this should be straigtforward with the current functionality.
Use the search pattern
^\d+\.
in the search dialog (Ctrl+F)
check [x] Regular Expression
and press the [Count] button.

hth,
vbr

Options: Reply | Quote | Up ^






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