How to pattern match the string

Maybe this post will be useful it the string value is known.

If the string values changes and only part of the string value matches the case value,