Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #24191

    Simon McMahon
    Participant

    Hi there, I have some XML files which have the following lines in them:
    <active>2019-02-24T11:30:00</active>
    <expires>2019-03-10T11:30:00</expires>

    I would like a Macro that uses editor.ReplaceInFiles and looks for line that starts with the <active> tag, then replaces the T11:30:00 with a new string like T14:00:00.

    The same logic would apply to line that starts with the <expires> tag, and replaces T11:30:00 with a *different* value ie: T23:00:00.

    I can use editor.ReplaceInFiles in a macro but it replaces all occurances of a value. I want to be specific to only lines starting with <active> or <expires>.

    Does that make sense?

    Happy to send through a sample file if that helps.

    Thanks, Simon

    #24195

    Stefan
    Participant

    You mean:

    Search for .: T11:30:00</active
    Replace with: T14:00:00</active

    Plain text search, no regex search.

     
    ?

     

    #25436

    Simon McMahon
    Participant

    Ahh, yes Stefan, working from the end of the line is a good idea. Thank you very much.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.