Hi team Help me in these Regex

Hi @Mada_Sai_Krishna ,

Please do avoid posting duplicate topics.

If the previous topic was already engaged and there was some information being passed about the workflow, Project type and restrictions, it would be lost in the newer posts i.e in your case, we would not have know the required expression should be in C# (still not sure) if not for the other post.

Do try to engage in the same topic where it was first collaborated with.

On the regex expression for the Input text, we are not very clear on the output representation, do you want to assign the split outputs to separate variables ? If so would the number of splits be always the same ? In your case it would be 5 Splits (5 variables).

If not the same number of split always, we would recommend to store it in a collection like an Array like it is shown below :

System.Text.RegularExpressions.Regex.Split(strText, @"(?=\\n\d+)").Select(x => x.Replace(@"\n", " ").Trim()).ToArray()

Immediate Panel:
image

Let us know if this does not work for all of your cases.

1 Like