Community
    • Login

    Change Upper to Lower Case only at the beginning of each line

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 2 Posters 2.4k 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.
    • Antoine GautierA
      Antoine Gautier
      last edited by

      Hello,

      I want to put words that begin with a capital letter in lower case, and this only applies to the beginning of each sentence, the rest of the sentence must remain intact (Respect the capital letter):

      Example text:

      A video game developed by Rockstar bla bla bla. (Rockstar must remain intact)

      After its release, the game is published on Android bla bla bla. (Android must remain intact)

      The script is set in New York City, bla bla bla bla. (New York City must remain intact)

      Make it like this (The change is made only at the beginning of each sentence) :

      a video game developed by Rockstar bla bla bla. (Rockstar must remain intact)

      after its release, the game is published on Android bla bla bla. (Android must remain intact)

      the script takes place in New York City, bla bla bla bla. (New York City must remain intact)

      Is it possible with Notepad++ ?

      Thanks for your help.

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Antoine Gautier
        last edited by Alan Kilborn

        @Antoine-Gautier

        Yes, if your examples are all lines starting at the left “margin” in Notepad++. Otherwise probably not. Please let us know which you have.

        1 Reply Last reply Reply Quote 0
        • Antoine GautierA
          Antoine Gautier
          last edited by

          Yes, all lines in text starting at the left “margin” in npp

          Alan KilbornA 1 Reply Last reply Reply Quote 0
          • Alan KilbornA
            Alan Kilborn @Antoine Gautier
            last edited by

            @Antoine-Gautier

            Then I might be tempted to try to search for (?-s)^(.)(.*) and replace with \L\1\E\2 with Regular Expression Search Mode selected.

            1 Reply Last reply Reply Quote 2
            • Antoine GautierA
              Antoine Gautier
              last edited by

              It works very well.

              Thank you so much for your help :)

              1 Reply Last reply Reply Quote 1
              • Alan KilbornA
                Alan Kilborn
                last edited by Alan Kilborn

                I suppose the much simpler search for (?-s)^. and replace with \L$0 also works fine…

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