# 以及 # 和尾随空格之间的文本的正则表达式
我正在尝试获取正则表达式:
- 获取“#”以及“#”和尾随“\t”(空格)之间的所有文本。
到目前为止我有:
/#[a-zA-Z0-9]\t/
这似乎是错误的?我可以做什么来修复它?
I am trying to get regex for:
- Get "#" and all text between "#" and trail ending "\t"(whitespace).
So far I have:
/#[a-zA-Z0-9]\t/
This seems wrong? What can I do to fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您所说的空白指的是实际的空白(即空格、制表符等),则可以这样做:
(
\S
相当于[^\s]
)但是,如果您指的是
制表符
,当您写入空格时,则如下:If by whitespace you mean actual whitespace (that is spaces, tabs, etc), then this does it:
(
\S
is equivalent to[^\s]
)If you however meant
tabs
, when you wrote whitespace, then this: