- April 9, 2018 at 10:48 am #22956
I have a Greek text with some English words and I want to filter the lines which begin with capital letter, how would I do that?
For example, in Find/Replace I would do
with Match Case and Use Regular Expressions checked.
but if I select Regex in the filter the \n bit does not work.April 9, 2018 at 12:37 pm #22957
Provided I didn’t mess up, the following should do
^start of string (i.e. line)
followed by a character within
followed by any character (except newlines)
occurring zero or more times
$end of string (i.e. line)
Let me know if it does or doesn’t work.
PS The full syntax would be
/^[Α-ΩA-Z].*$/gmApril 10, 2018 at 12:53 am #22959
This did it for me
(I had to add “Ά-Ώ” so that it would get capitals with accents too)
Is there a way to show the number of lines filtered?April 10, 2018 at 5:11 am #22960
Regarding the number of lines filtered:
Use the “Word Count” plugin (Tools → Plug-ins → 9 WordCount)
Word count shows the total number of “Lines” and the “View Lines”, with the View Lines corresponding to the number of filtered lines.
Hit ctrl+a to select all.
The status bar in the bottom right corner will then show the number of selected lines.April 10, 2018 at 6:36 am #22961
Option 1: Takes ages to load…
Option 2: always shows the total number of lines for FULL fileApril 10, 2018 at 10:27 am #22964
As in the image:
Hit ctrl+a to select all lines, then the bottom right indicator shows the number of selected lines and the total number of lines.
Option 2 is fast in my case. There is one downside that Option 2 does add the last line to the count if it is blank.
PS Regarding option 1:
Yes, sadly sluggish performance is the case for large files.April 10, 2018 at 10:47 am #22970
I am working with a 500.000 lines file and Option 2 apparently works (in my case does not work at all, see screen) if “Word Count” plugin is active, which means… very slow performance. It was dead slow even with a 30.000 lines file.April 13, 2018 at 11:33 am #23016Yutaka EmuraKeymaster
Hi Patrick C,
Regarding Option 2, I am not sure what you mean by “There is one downside that Option 2 does add the last line to the count if it is blank.”
Can you please clarify this sentence?April 14, 2018 at 5:07 am #23021
I’ve now noticed, that word count does the same thing but the other way round.
What I basically meant is as follows:
Case where the last line is not blank:
Results in ctrl-a finding 13+1 = 14 lines instead of 13; Word count finds 13 view lines
Case where the last line is blank:
Results in ctrl-a finding 13 lines; interestingly Word count finds 14 view lines
April 14, 2018 at 4:26 pm #23025Yutaka EmuraKeymaster
I fixed the issue with the number of selected lines incorrectly displayed in the status bar and the Word Count plug-in.
I also optimized the Word Count plug-in for speed, but if you need to speed up the plug-in, you might want to remove unnecessary queries such as Widths.
Also, queries using regular expressions can take much longer time than others, so should be removed if unnecessary.
Thanks,April 28, 2018 at 1:48 am #23092
Probably Spiros already knows, but if not (hope you get notified of follow up replies to this post):
Yutaka’s new Character count plug in is super fast and its ‘view line’ field shows the number of lines filtered.
Thank you Yutaka!
And btw: Also thank you for the DirectWrite implementation – I absolutely love it, the text is crispy clean and Emojis now work great too.
- You must be logged in to reply to this topic.