I’ve got an XML in which I’ve got a number of nodes which contain paths, in which I (may) need to change some of the path if certain information is found.
For example, a node like this may exist:
<File name="dev\Desktop\Working\Test\English\1312\myopic.dll">
I need to find all paths that have a 4 digit number in the path (like ‘1312’ above), and change this to something like %NUM%.
What’s the best approach? My first thoughts were to use RegEx, but from some searching it seems like that’s a bad idea?
Maybe LINQ to XML (I have some limited experience with that)?
I think that Regex here is the most effecint solution here, It is not bad idea at all