• Login
Community
  • Login

Bug: Search/Replace All does not replace all

Scheduled Pinned Locked Moved General Discussion
4 Posts 4 Posters 747 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.
  • J
    Jay Imerman
    last edited by Jay Imerman Mar 16, 2020, 12:50 PM Mar 16, 2020, 12:49 PM

    For example, paste the following into Notepad++, then press Ctrl-H, search for double-quote “, and replace with backslash-double-quote \”, pick Replace All. Note that not all are replaced.

    Notepad++ x64 v7.8.4

    TEST EXAMPLE:

    {
    “elements”: [
    {
    “name”: {
    “locale”: {
    “country”: “US”,
    “language”: “en”
    },
    “value”: “Sacramento, California Area”
    },
    “country”: “urn:li:country:us”,
    “id”: 82,
    “$URN”: “urn:li:region:82”,
    “states”: [
    “urn:li:state:(urn:li:country:us,CA)”,
    “urn:li:state:(urn:li:country:us,NV)”
    ]
    },
    {
    “name”: {
    “locale”: {
    “country”: “US”,
    “language”: “en”
    },
    “value”: “San Francisco Bay Area”
    },
    “country”: “urn:li:country:us”,
    “id”: 84,
    “$URN”: “urn:li:region:84”,
    “states”: [
    “urn:li:state:(urn:li:country:us,CA)”
    ]
    },
    …
    ],
    “paging”: {
    “count”: 10,
    “start”: 0
    }
    }

    A E 2 Replies Last reply Mar 16, 2020, 1:14 PM Reply Quote 0
    • A
      Alan Kilborn @Jay Imerman
      last edited by Mar 16, 2020, 1:14 PM

      @Jay-Imerman

      Works fine for me. Maybe more details about what you are doing (screenshot?) and what you are ending up with?

      1 Reply Last reply Reply Quote 1
      • E
        Ekopalypse @Jay Imerman
        last edited by Mar 16, 2020, 1:22 PM

        @Jay-Imerman said in Bug: Search/Replace All does not replace all:

        Note that not all are replaced.

        This makes me suspect that the replacements are all after the current
        caret position and you haven’t checked wrap around, is that right?

        1 Reply Last reply Reply Quote 2
        • G
          guy038
          last edited by guy038 Mar 16, 2020, 5:51 PM Mar 16, 2020, 5:49 PM

          Hello, @jay-imerman and All,

          And, if you run this S/R, using the Regular expression search mode, you must adopt this syntax :

          SEARCH "

          REPLACE \\"

          because the Escape \ is a special regex character and needs to be escaped, itself, with an other \ symbol, to be taken as a literal !

          Best Regards,

          guy038

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