• Login
Community
  • Login

How to make new lines without deleting

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
17 Posts 3 Posters 3.3k 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.
  • M
    Markomarin
    last edited by Markomarin Aug 6, 2018, 6:18 PM Aug 6, 2018, 6:17 PM

    I see and I’m trying to do what you’ve said but I got a notification saying “You are only allowed to edit posts for 180 second(s) after posting”:) although I have posted long ago.

    S 1 Reply Last reply Aug 6, 2018, 6:21 PM Reply Quote 0
    • M
      Markomarin
      last edited by Aug 6, 2018, 6:20 PM

      Maybe I have delete and and post a new one.

      S 1 Reply Last reply Aug 6, 2018, 6:36 PM Reply Quote 0
      • M
        Markomarin
        last edited by Markomarin Aug 6, 2018, 6:22 PM Aug 6, 2018, 6:21 PM

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • S
          Scott Sumner @Markomarin
          last edited by Aug 6, 2018, 6:21 PM

          @Markomarin

          …only allowed to edit posts for 180 second(s) after posting

          Yes, this happens for everyone…just add a new post, don’t worry about the old one. The 180 seconds is for each individual post, not posts even older than that just because you happened to add a recent new post.

          1 Reply Last reply Reply Quote 1
          • M
            Markomarin
            last edited by Aug 6, 2018, 6:27 PM

            The text is like
            “xyzxyz
            1. xyzxyz
            xyzxyz
            2. xyzxyz
            xyzxyz
            3. xyzxyz”
            The desired is like
            "xyzxyz

            1. xyzxyz
            xyzxyz
            
            2. xyzxyz
            xyzxyz
            
            3. xyzxyz"
            
            1 Reply Last reply Reply Quote 0
            • S
              Scott Sumner @Markomarin
              last edited by Aug 6, 2018, 6:36 PM

              @Markomarin

              Tip: You can edit the text you want to post here in Notepad++, then copy and paste it here. If you used the Markdown Viewer plugin, you should see a close representation to what it will look like when posted.

              Tip: Make sure that what shows up in the preview window is really what you want before clicking on Submit.

              1 Reply Last reply Reply Quote 2
              • M
                Markomarin
                last edited by Aug 6, 2018, 6:50 PM

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • M
                  Markomarin
                  last edited by Markomarin Aug 6, 2018, 7:01 PM Aug 6, 2018, 7:00 PM

                  Dear Scott Sumner,
                  Everything is correct in the preview window, I put 4 spaces before every line including spaces but whenever I post it seems faulty.

                  1 Reply Last reply Reply Quote 0
                  • P
                    PeterJones
                    last edited by PeterJones Aug 6, 2018, 7:36 PM Aug 6, 2018, 7:35 PM

                    @Markomarin,

                    Regex Issue

                    As mentioned in another thread , we linked you to the regex documentation FAQ three months ago, with the expectation that you wanted to learn, and would thus make use of those resources, rather than just continuing to have us do your job / hobby for you.

                    In a help forum like this (especially one that’s about an application, not a general regular expression help forum), requests for help are always taken better when you show a willingness to learn, and when you show an effort in your question. When you come every few months, and ask us to do all your regex work for you, we can lose interest in helping you.

                    (For all we know, you are being paid for the results of what you’re asking us to do. We are just volunteering. If we think you’re learning, we’ll probably keep helping. If we think you are trying to get free consulting work, you’ll find it harder to get answers.)

                    So, for example, after correctly quoting your text: show us regular expression you’ve tried, and explain why what you chose the regex you did (ie, what you think that regular expression is doing), and tell us what is wrong with the results.

                    Formatting issues:

                    When you say “everything is correct in the preview window”, we are asking you to look in the window on the right. When you indent text by four characters, in the preview window, it will show up in an obvious black box. Does it for you? If not, then not everything is correct in the preview window. Something that Scott might not have made clear: you need a blank line before and after the indented text.

                    For example, if I have this exact text:

                    \======
                    some normal text
                    
                        Four spaces, then your text, will offset it, and will prevent special `characters` and **blanks** from being deleted
                    
                    more normal text.
                    \======
                    

                    should look like this in your preview window, and thus in the final posting:

                    ======
                    some normal text

                    Four spaces, then your text, will offset it, and will prevent special `characters` and **blanks** from being deleted
                    

                    more normal text.
                    ======

                    For other formatting hints, you may want to study this post for more details.

                    1 Reply Last reply Reply Quote 4
                    • M
                      Markomarin
                      last edited by Aug 6, 2018, 10:52 PM

                      Dear Peter Jones and Scott Sumner,
                      Of course I really appreciate your work and help you have given to over the months. Let me state the obvious I am not an expert on these issues. I have been using notepad++ for some months. And if I have offended or prevented from your concentration please accept my apologies.
                      I am using (regular exp.)

                      ^\d+\.\s 
                      \n 
                      

                      For the text like

                      xyzxyz
                      11. xyzxyz
                      xyzxyz
                      22. xyzxyz
                      xyzxyz
                      

                      it becomes

                      xyzxyz
                      
                      xyzxyz
                      xyzxyz
                      
                      xyzxyz
                      xyzxyz
                      

                      However what I want is

                      xyzxyz
                      
                      11. xyzxyz
                      xyzxyz
                      
                      12. xyzxyz
                      xyzxyz
                      

                      I think I could express my intentions. I greatly appreciated your past help and wouldn’t mind being neglected as you don’t have to prepare regex for ordinary computer users. Regards

                      S 1 Reply Last reply Aug 6, 2018, 11:23 PM Reply Quote 3
                      • S
                        Scott Sumner @Markomarin
                        last edited by Scott Sumner Aug 6, 2018, 11:26 PM Aug 6, 2018, 11:23 PM

                        @Markomarin

                        So to me, the proper formatting really Really REALLY helps in clarifying the problem. It doesn’t make those willing to help have to think really hard about “just what IS the problem here” or “what IS the real data”, but rather they can think about solutions, which is the thing desired by all but especially the OP!

                        And showing what you’ve already tried is great too because it gives something to build upon! So I think we can start with what you have and tweak it slightly. Let’s use something called capturing groups. With them, you can use part of the Find expression in the Replace expression. You capture with parentheses, ( and ).

                        So in your case, if we capture like this in the Find expression: ^(\d+\.\s), whatever text matches what is between the parentheses goes into what is called Capture Group #1.

                        If we change your Replacement expression, like so: \n\1, wherever we see a \1, the contents captured in the find expression get inserted into the replacement text.

                        That all being said…are the better ways to write your find-and-replace expressions for this example? I would say that there are, but at this point it probably isn’t constructive to throw out what you arrived at, but simply better to just alter it slightly.

                        M 1 Reply Last reply Aug 7, 2018, 9:53 AM Reply Quote 2
                        • M
                          Markomarin @Scott Sumner
                          last edited by Aug 7, 2018, 9:53 AM

                          @Scott-Sumner
                          That was just the thing I was looking for, that was another thing I learned from this great community, Thanks guys.

                          1 Reply Last reply Reply Quote 2
                          15 out of 17
                          • First post
                            15/17
                            Last post
                          The Community of users of the Notepad++ text editor.
                          Powered by NodeBB | Contributors