• Login
Community
  • Login

Help needed with Search and Replace

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
2 Posts 2 Posters 162 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.
  • S
    Sandra Treffers
    last edited by Jul 13, 2021, 12:26 PM

    I do not want the document number in my XML File.
    I tried search and replace but don’t know how to use it in the right way.

    What do i need to SEARCH for if i want all the <Document number=“[0-9}”> tags need to be replaced with the tag: <Document> ? Or is there an other way to delete these numbers.

    Below an example of the XML file with 2 documents

    a574b524-7d0a-4ca1-b078-b9c9f7ba4625-image.png

    A 1 Reply Last reply Jul 13, 2021, 1:01 PM Reply Quote 1
    • A
      astrosofista @Sandra Treffers
      last edited by Jul 13, 2021, 1:01 PM

      @Sandra-Treffers, All

      You were close. One way to solve it is the following regex:

      Search: (<Document) number="[\d]+">
      Replace: $1>
      

      Put the caret at the very beginning of the document, select the Regular Expression mode and click on Replace or Replace All.

      Hope this helps.

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