小编jam*_*l55的帖子

PHP后台进程

我写了一个php irc bot,但我需要它在后台工作.有了这个就没有退出.做这个的最好方式是什么?

感谢致敬.

php bots background-process

6
推荐指数
1
解决办法
2149
查看次数

preg_match到domain.tld

我怎样才能获得只包含domain.tld的字符串?

if (preg_match('^(?:[-A-Za-z0-9]+\.)+[A-Za-z]{2,6}$', $domain))
echo "domain.tld found!";
Run Code Online (Sandbox Code Playgroud)

但对于正则表达式^(?:[-A-Za-z0-9]+\.)+[A-Za-z]{2,6}$,子域也没问题.但我只想检查"domain.tld".我应该使用什么正则表达式?

谢谢.

php regex preg-match

3
推荐指数
1
解决办法
8934
查看次数

标签 统计

php ×2

background-process ×1

bots ×1

preg-match ×1

regex ×1