What can I use to find part of a phrase in a string?

I’m trying to set up a commands system, but I’m not sure how I would find if the string has a slash at the beginning. Similar to some programming languages (I’m referring to Batch files or MS DOS in this lol), you can use the asterisk/star symbol (*) to substitute portions of variables. So I guess what I’m looking for is something like this:

if (someString == "/*") {

Do some command code here}

Because the if statement is only looking for if the user has a slash at the beginning, I couldn’t really use Split. How would this work in C#?

You could use a RegularExpression? Found in the below namespace:

using System.Text.RegularExpressions;

void Foo()
{ 
     if(Regex.IsMatch(someString, "\*"))
       {
           //You have a match
       }
}

if (someString.StartsWith (“/”)) {