2014-02-23, 01:44
Hi, I'm trying to read and replace lines in an xml file.
I'm trying to find "<control type="videowindow">" and it's companion "</control>"
replacing "<control type="videowindow">" is easy enough (since there is only one), but finding it's matching "</control>" is the tricky part.
I figure the easiest way would be to readline the xml file and use search n replace, but I can't figure out the correct regex pattern to match the string.
Could some either suggest a better alternative or assist me in creating a regex for this pattern?
Thanks
I'm trying to find "<control type="videowindow">" and it's companion "</control>"
replacing "<control type="videowindow">" is easy enough (since there is only one), but finding it's matching "</control>" is the tricky part.
I figure the easiest way would be to readline the xml file and use search n replace, but I can't figure out the correct regex pattern to match the string.
Could some either suggest a better alternative or assist me in creating a regex for this pattern?
Thanks