- AuthorPosts
- January 16, 2019 at 3:11 pm #24191Simon McMahonParticipant
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
January 18, 2019 at 5:36 am #24195StefanParticipantYou mean:
Search for .: T11:30:00</active
Replace with: T14:00:00</activePlain text search, no regex search.
?February 20, 2019 at 6:04 pm #25436Simon McMahonParticipantAhh, yes Stefan, working from the end of the line is a good idea. Thank you very much.
- AuthorPosts
- You must be logged in to reply to this topic.