I am new to C#. I am able to deternine if the string is found in a input record using the following code but I need to extract the found string (it should also contain some addtional characters) so that I can see what I have found, because I am doing a partial search.

For example I am looking "NY" in a string which will carry city names. I should be able to get for example"New york" (Don't mind few more letters but at least I will be able to see what I found). Here is the code I am using for searching a string.

```
 if (System.Text.RegularExpressions.Regex.IsMatch(CityNames, CheckName, System.Text.RegularExpressions.RegexOptions.IgnoreCase))
                {
                    MessageBox.Show("String Found");

                }
                else
                {
                    MessageBox.Show("String Not Found");

                }

```