How to change If Else and foreach tag to aspose tag in word using C#

how we can change the custom tag of inserting doc tag from word document to aspose tag of using doc tag using aspose word C# ?
for example lets assume the doc file has following content:
hello world! «IF “var” CONTAINS Id»<<Name>>«ELSE»«Address»«END IF» has execute the templated.

then we have to change «IF “var” CONTAINS Id»<<Name>>«ELSE»«Address»«END IF» with <<If [var.Contains(Id)]>><<[Name]>><<else>><<[Address]>><</If>> as aspose compatible field

@jilp You can use Find/Replace functionality to match the required custom tags and replace them with Aspose.Words LINQ syntax. You can use the same technique as was suggested in another your thread.