C#Regex验证输入格式

Use*_*384 -4 c# regex

我有这样的输入格式:

{random string} + " " + {integer}
Run Code Online (Sandbox Code Playgroud)

例如

a)    stringInput 43

b)    abcdefghijkl 89
Run Code Online (Sandbox Code Playgroud)

如何使用Regex验证此格式?

我遇到了一个问题:字符串的正则表达式是什么?

Luk*_*ley 5

public bool IsValidString(string s)
{
  string[] strs = s.Split(' ');
  int i = 0;
  if (strs.Length != 2)
    return false;
  return (int.TryParse(strs[1], out i);
}
Run Code Online (Sandbox Code Playgroud)

如果你不理解它,你真的不需要使用正则表达式,如果你想看看它只是一种替代方法.它可能更容易阅读,我个人觉得Regex很难阅读.