Extract and count particular word present between two constant word

@yashashwini2322 ,

Maybe the Suggestion of Dictionary Storage provided was wrong for your case as we see you have created another Topic on the same :

If the requirement is to create Separate Variables, then we can check with the below Expressions :

Major = Regex.Matches(MatchValue,"\bMajor\b",RegexOptions.IgnoreCase).Count
Minor = Regex.Matches(MatchValue,"\bMinor\b",RegexOptions.IgnoreCase).Count
Moderate = Regex.Matches(MatchValue,"\bModerate\b",RegexOptions.IgnoreCase).Count

Here, Minor, Major and Moderate are Integer type variables.

Let us know if this does not work for you and maybe explain a bit more to understand the exact need.