Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 powershell 从下面的文本中提取数字 19?
06A8 07E:0 不可见 19 (M) 51206
是的,正则表达式可能是最简单的。
$s = "06A8 07E:0 Not Visible 19 (M) 51206" if ($s -match "\s[[A-Za-z\s]+(\d+)") { $matches[1]; }