I have a paragraph like below:
Some wording for testing [!#today] where the [!condition] does not satisfy with this verbiage [!ShowElemIf://Student/FullName; [[[Text not recognized fully]]] ;/First Name] But simple tags found having age [!ShowElemIf://Student/Age;xml//Student/DOB/@formatted;y]
I need to find all the placeholders/tags from above which are like: [!tag] using C#. I tried for a regex but it is not able to find the tag having "FullName" word as highlighted in bold above.
List<string> tags = Regex.Matches(
sampleText.Replace(Environment.NewLine, ""), @"\[!([^]]+)\] ")
.Cast<Match>()
.Select(x => x.Groups[1].Value)
.ToList();
Using this RegEx I can find below but not the highlighted one.
- today
- condition
- ShowElemIf://Student/Age;xml//Student/DOB/@formatted;y