如何从字符串中删除引号?
$string = "my text has \"double quotes\" and 'single quotes'";
如何从 $string
中删除所有类型的引号(不同语言)?
$string = "my text has \"double quotes\" and 'single quotes'";
How to remove all types of quotes (different languages) from $string
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我猜你的意思是引号?
否则,使用一些正则表达式,这将适用于 html 引号,例如:
C 样式引号:
CSS 样式引号:
bash 样式引号:
等等...
I assume you mean quotation marks?
Otherwise, go for some regex, this will work for html quotes for example:
C-style quotes:
CSS-style quotes:
bash-style quotes:
Etc etc...
您可以在一行中执行相同的操作:
You can do the same in one line: