0

It's that if I type {{member}} and {{memberstop}} then it should remove the text from member to member top and thus add a picture instead.

Thus, it may well be that point is found in several places on the page.

I've done this.

Regex regEx = new Regex(@"{{\w*}}");
        MatchCollection rows = regEx.Matches(text);
        foreach (Match row in rows)
        {
            var block = listBlocks.FirstOrDefault(ib => ib.Tag == row.Value);
            if (block.categorid == 1)
            {
                if((checkSessionIsLoggin() == true) && Userid() == Settings.Rank.Admin() || Userid() == Settings.Rank.PakkeInfo())//Admin og users (PAY)
                {
                    text = text.Replace(row.Value, block.Value);
                }
                else
                {

                     text = text.Replace(row.Value, block.Value);
                }

            }
        }

That is, if I write:

{{member}}
And there is every possible text in here ... then it just made it into a picture
{{memberstop}}

Then I can well add some text where it in no way has to make anything for picture or resemble, so I can find {{member}} and {{memberstop}} in several places.

I find this here: Regex Match all characters between two strings

How do I add it here to my Regex that already exists?

{(?s)(.*){medlem}}.*{{medlemstop}}

0 Answers0