“~"是什么意思?PHP正则表达式中的字符表示? [英] What does the "~" character signify in PHP regex?

查看:53
本文介绍了“~"是什么意思?PHP正则表达式中的字符表示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的~"字符是什么意思?:

What does the "~" character mean in the following?:

preg_match_all("~<img [^>]+>~", $inputw, $output);

我的猜测是它们是开始和结束标记,例如 ^ 和 $.

My guess is that they are beginning and end markers such as ^ and $.

推荐答案

这是一个 分隔符

分隔符可以是任何非字母数字、非反斜杠、非空白字符.

A delimiter can be any non-alphanumeric, non-backslash, non-whitespace character.

这篇关于“~"是什么意思?PHP正则表达式中的字符表示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆