Python理解正则表达式

eth*_*jyx 2 python regex

嗨,我正在阅读一些代码并发现re.compile("<@(U\S+)>"),我很难理解<>.有人能给出一个匹配的例子吗?我曾尝试在python交互式shell中使用'<@U>'或者'<@jyx>'它们不匹配.谢谢.

vks*_*vks 5

<> 没有意义.

你必须提供<@U,然后1 or more non space characters>进行匹配.

喜欢

<@UASD>
<@US>
Run Code Online (Sandbox Code Playgroud)

你的意见

<@U> did not match as no non space character present after U

<@asd> did not match as no U present after @
Run Code Online (Sandbox Code Playgroud)