前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >PHP 7.0.0中ereg_replace 函数使用preg_replace替换方法

PHP 7.0.0中ereg_replace 函数使用preg_replace替换方法

原创
作者头像
Python进阶者
修改2021-08-27 18:05:59
1.6K0
修改2021-08-27 18:05:59
举报
文章被收录于专栏:Python爬虫与数据挖掘

在PHP 7.0.0中ereg_replace 函数使用preg_replace替换方法如下:

ereg_replace — Replace regular expression (在PHP 4, PHP 5中) 这个函数在PHP 5.3.0 中就已经不赞成使用,并在 PHP 7.0.0.中被移除

1

string ereg_replace ( string $pattern , string $replacement , string $string )

查看更多 http://php.net/manual/en/function.ereg-replace.php

preg_replace — Perform a regular expression search and replace (在PHP 4, PHP 5, PHP 7中)

1

mixed preg_replace ( mixed $pattern , mixed $replacement , mixed $subject [, int $limit = -1 [, int &$count ]] )

查看更多 http://php.net/manual/en/function.preg-replace.php

在PHP 7.0.0中ereg_replace 函数可使用preg_replace代替,只是将ereg_replace中的$pattern两边加上”/“以闭合如"/pattern/"。

下面介绍一个关于visual studio运行报错的方法:

visual studio 运行程序的时候,如果在运行过程中想要修改一些代码结果显示 changes are not allowed while code is running 如下所示,还要停止运行然后编辑完再运行查看结果,感觉很不方便而且效率低。

图片
图片

解决办法: 英文版:tools->options->debugging->general,将前面的勾选取消"Enable Edit and Continue”。

中文版:工具->选项->调试->常规->将 启用“编辑并继续”前面的对勾去掉如下图:

图片
图片

往期精彩文章推荐:

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档