• Login
Community
  • Login

"Invalid regular expression" error after crossing line ~3000000

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 4 Posters 1.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B
    Bahaa0013
    last edited by Bahaa0013 Mar 11, 2023, 2:36 PM Mar 11, 2023, 2:34 PM

    I’m using @guy038 regex list to mark 2 lines after a specific word, But I noticed that the regex fail after crossing line ~3000000,… And sometimes it doesn’t mark all the lines, But I can find the lines that should be bookmarked using the same regex…

    regex used : ’ (?-s)^.XXX.\R\K.+\R|\G.+ ’
    and ’ (?-is)^.XXX.\R\K.\R.\R ’

    18972055-2e2d-4e9e-814c-a022e13d3f63-image.png

    A 1 Reply Last reply Mar 11, 2023, 2:42 PM Reply Quote 0
    • A
      Alan Kilborn @Bahaa0013
      last edited by Mar 11, 2023, 2:42 PM

      @Bahaa-Eddin-ツ said in “Invalid regular expression” error after crossing line ~3000000:

      regex used : ’ (?-s)^.XXX.\R\K.+\R|\G.+ ’
      and ’ (?-is)^.XXX.\R\K.\R.\R ’

      Do you think you can fix the display of these so that readers don’t have to go thru mental gyrations to get to what you’re talking about?

      B 1 Reply Last reply Mar 11, 2023, 2:46 PM Reply Quote 1
      • B
        Bahaa0013 @Alan Kilborn
        last edited by Mar 11, 2023, 2:46 PM

        @Alan-Kilborn
        I think everything is clear :)
        Can you explain the thing you didn’t understand so I can edit the post

        P 1 Reply Last reply Mar 11, 2023, 6:06 PM Reply Quote 0
        • G
          guy038
          last edited by Mar 11, 2023, 3:20 PM

          Hello, @Bahaa-Eddin-ツ, @alan-kilborn and All,

          @Bahaa-Eddin-ツ, I suppose that you’re speaking about this post : How to bookmark lines around a line containing a specific expression ‘XXX’ ?

          In this case, You should study, first, my last version, here on this topic !

          Best Regards,

          guy038

          1 Reply Last reply Reply Quote 1
          • P
            PeterJones @Bahaa0013
            last edited by Mar 11, 2023, 6:06 PM

            @Bahaa-Eddin-ツ said in “Invalid regular expression” error after crossing line ~3000000:

            Can you explain the thing you didn’t understand so I can edit the post

            His point was, because you didn’t use ` before and after your regex (to put it in a red typeface), the asterisk wildcards in your regex became italics in your post. It makes it very hard to know what regex you tried when you don’t even look at the “preview” or the post after you’ve hit SUBMIT, and notice that the regex that’s shown isn’t the regex that you tried.

            ----

            Useful References

            • Please Read Before Posting
            • Template for Search/Replace Questions
            • Formatting Forum Posts
            • Notepad++ Online User Manual: Searching/Regex
            • FAQ: Where to find other regular expressions (regex) documentation
            1 Reply Last reply Reply Quote 2
            4 out of 5
            • First post
              4/5
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors