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.
以下正则表达式试图匹配什么: expect -re "classType=(.{3})"?这(.{3})在正则表达式中意味着什么?
expect -re "classType=(.{3})"
(.{3})
在正则表达式中,.匹配任何字符,{3}是使某些内容重复三次的后缀(即,...),并且它周围的括号使其成为捕获组。(这意味着匹配的输入将在$expect_out(1,string)之后可用。)
.
{3}
...
$expect_out(1,string)
同(...)--- 三个字符。
(...)