Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • #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.

    Patrick C

    Provided I didn’t mess up, the following should do


    ^ start of string (i.e. line)
    followed by a character within [Α-ΩA-Z]
    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


    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?

    Patrick C

    Regarding the number of lines filtered:

    Option 1:
    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.

    Option 2:
    Hit ctrl+a to select all.
    The status bar in the bottom right corner will then show the number of selected lines.


    Option 1: Takes ages to load…
    Option 2: always shows the total number of lines for FULL file

    Patrick C

    As in the image:
    Option 2:
    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.

    Word count

    PS Regarding option 1:
    Yes, sadly sluggish performance is the case for large files.


    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.


    Yutaka Emura

    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?

    Patrick C

    Hello Yutaka

    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:
    Last line not blank

    Results in ctrl-a finding 13+1 = 14 lines instead of 13; Word count finds 13 view lines
    An additional line found

    Case where the last line is blank:
    Last line blank

    Results in ctrl-a finding 13 lines; interestingly Word count finds 14 view lines
    13 lines found; 14 in case of word count

    Yutaka Emura

    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.

    Patrick C

    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.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.