Community
    • Login

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

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 1.2k Views 2 Watching
    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 Offline
      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 Offline
        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 Offline
          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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors