Home > Backend Development > PHP Tutorial > 请问一个正则

请问一个正则

WBOY
Release: 2016-06-13 13:26:01
Original
972 people have browsed it

请教一个正则
微薄中经常会有#号之类的话题,但如果在#号中间有@某人的东西。又不是我想要的东西

我现在想写个正则是检测他是#号话题的。但里面不能有@的 怎么写啊 

比如:
1. #话题@某人 XXX# 不是我想要的
2. #话题XXX# 是正确的

------解决方案--------------------
#([^#@]*)#

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template