• Login
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.5k 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.
  • A
    Antoine Gautier
    last edited by Jan 17, 2020, 9:51 AM

    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.

    A 1 Reply Last reply Jan 17, 2020, 12:44 PM Reply Quote 0
    • A
      Alan Kilborn @Antoine Gautier
      last edited by Alan Kilborn Jan 17, 2020, 12:44 PM Jan 17, 2020, 12:44 PM

      @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
      • A
        Antoine Gautier
        last edited by Jan 17, 2020, 1:30 PM

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

        A 1 Reply Last reply Jan 17, 2020, 1:38 PM Reply Quote 0
        • A
          Alan Kilborn @Antoine Gautier
          last edited by Jan 17, 2020, 1:38 PM

          @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
          • A
            Antoine Gautier
            last edited by Jan 17, 2020, 1:47 PM

            It works very well.

            Thank you so much for your help :)

            1 Reply Last reply Reply Quote 1
            • A
              Alan Kilborn
              last edited by Alan Kilborn Jan 17, 2020, 8:43 PM Jan 17, 2020, 8:42 PM

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

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