Community
    • Login

    How to replace any text between some text without specifics

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 651 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.
    • th3lifeoftorchT Offline
      th3lifeoftorch
      last edited by

      So I am editing a mod for a game called Star Wars empire at war on pc. I need help understanding how to replace text between text all at once
      (Ex.)I want to replace all <Tactical_Build_Time_Seconds>10</Tactical_Build_Time_Seconds> the ten in the middle I want to replace to a 1. However here is the issue. A lot of files have different numbers like <Tactical_Build_Time_Seconds>3.75</Tactical_Build_Time_Seconds> and <Tactical_Build_Time_Seconds>75</Tactical_Build_Time_Seconds> so how do I go about changing all of the numbers between all of the <Tactical_Build_Time_Seconds></Tactical_Build_Time_Seconds> at once? please and thank you.

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

        @th3lifeoftorch ,

        Our FAQ: Generic Regular Expression (regex) Formula page has links to replacing in a specific zone of text, and the related replacing a complete hierarchy between an opening XML/HTML tag and its corresponding closing tag (which would help if you had nested XML tags, though I don’t think you do). Most likely, the “zone of text” formula will give you what you need.

        Though, really, with as simple as yours is, the regular expression search <Tactical_Build_Time_Seconds>\d*\.?\d*</Tactical_Build_Time_Seconds> should be enough for the FIND WHAT

        th3lifeoftorchT 1 Reply Last reply Reply Quote 3
        • th3lifeoftorchT Offline
          th3lifeoftorch @PeterJones
          last edited by

          @PeterJones Very much appreciate this, you saved me a lot of time

          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