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.
我正在尝试获取正则表达式:
到目前为止,我有:
/#[a-zA-Z0-9]\t/
这似乎是错误的?我能做些什么来修复它?
如果你所说的空格是指实际的空格(即空格、制表符等),那么可以这样做:
/#\S+/
(\S相当于[^\s])
\S
[^\s]
但是,如果您的意思是tabs,当您写空格时,那么:
tabs
/#[^\t]+/