Community
    • Login

    find "value": "word or two or three" replace with "value": "?"

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 423 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.
    • isntworkdullI
      isntworkdull
      last edited by

      hi all,

      can anyone advise how i can find “value”: “word or two” replace with “value”: “?”

      I managed to use “value”: “\w*” but it only finds single words - anyway for it to find single and two or three words (basically anything inside the “”

      regards

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @isntworkdull
        last edited by

        @isntworkdull

        "[^"]*" will find everything from one quote to the next. but I would personally make it slightly more restrictive, not allowing newlines, which would become "[^"\r\n]*" So "value": "[^"\r\n]*" will find one or more words in the second pair of quotes, without allowing it to go across multiple lines, and might be useful to you.

        ----

        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
        isntworkdullI 1 Reply Last reply Reply Quote 2
        • isntworkdullI
          isntworkdull @PeterJones
          last edited by

          @PeterJones said in find "value": "word or two or three" replace with "value": "?":

          “value”: “[^”\r\n]*"

          perfect - I would never have got to that!!

          thank you

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