• Login
Community
  • Login

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

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 2 Posters 437 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.
  • I
    isntworkdull
    last edited by Dec 19, 2023, 2:08 PM

    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

    P 1 Reply Last reply Dec 19, 2023, 2:12 PM Reply Quote 0
    • P
      PeterJones @isntworkdull
      last edited by Dec 19, 2023, 2:12 PM

      @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
      I 1 Reply Last reply Dec 19, 2023, 2:17 PM Reply Quote 2
      • I
        isntworkdull @PeterJones
        last edited by Dec 19, 2023, 2:17 PM

        @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
        3 out of 3
        • First post
          3/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors