问题标签 [eregi]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
850 浏览

php - 将 eregi 转换为 preg_match 并将 ereg_replace 转换为 preg_replace

我正在使用http://www.internoetics.com/2010/01/12/simple-whois-php-script/ PHP whois 脚本,我需要为最新的 PHP 版本配置它,我需要将 ereg 和 eregi 转换为 preg_match 和 preg_replace

谢谢

0 投票
2 回答
1306 浏览

php - 将eregi转换为php 5.3

有谁知道我将如何将以下代码转换为 php 5.3?

谢谢

-詹姆士

0 投票
2 回答
93 浏览

php - PHP找到匹配的eregi?

我这里有这段代码

搜索返回Mozilla/5.0 (Android; Tablet; rv:14.0) Gecko/14.0 Firefox/14.0

这个发现在一个数组中

此 if 语句位于 foreach 语句中,因此中断。

我的 if 语句返回未知!我的查找字符串 ((Android) && (Tablet)) 有问题还是我不​​想使用 eregi?

0 投票
1 回答
213 浏览

php - PHP 将 eregi() 字符串转换为 preg_match 或 preg_replace

请有人帮我把这个字符串从 eregi() 转换为 preg_match 或 preg_replace 吗?非常感谢!

0 投票
1 回答
86 浏览

php - 修复 eregi_replace 函数

我的网站最近爆了,因为 eregi_replace 被淘汰了。现在我需要将它们转换为 preg_replace 或其他东西。这适用于我的大多数功能,但我遇到了模拟 bbtags 的问题。

有人可以帮忙吗?

0 投票
1 回答
122 浏览

php - PHP - 如何通过预匹配替换eregi 代码

嗨,我有以下代码使用 PHP 所说的 eregi() 函数已被贬值。我正在尝试将其转换为替换函数(预匹配),但我不太确定如何去做,因为我是预匹配函数的新手。

如何在 preg match 函数中布局上述代码?

谢谢

0 投票
2 回答
183 浏览

php - weird php eregi behaviour in wamp and xampp

Recently I saw a problem in a simple code:

wamp server returns true, while xampp server returns false! I know that eregi is deprecated, but right know I expect it to work fine in php 5.3.1

My Question

Is there any php or apache config caused this behavior?

A simple test file of the script is uploaded here: eregi on xampp + phpinfo
The above code in my wamp is here: eregi on wamp + phpinfo

I don't want you to solve my problem, I just want to know why this kind of problems happen.

0 投票
2 回答
4218 浏览

php - 电子邮件验证中不推荐使用 eregi() 函数

嗨,我知道我们不是 eregi,而是 preg_match,但是当我只更改 eregi 代码时它不起作用,我如何更改下面的代码,请大家帮忙,我是新手

0 投票
3 回答
1022 浏览

php - URL 验证使用 eregi() 但现在使用 preg_match

eregi() 已弃用,需要替换为 preg_match。如何将以下语法转换为 preg_match?假设以下是 url 并且它是必需的正则表达式模式:

以下代码工作正常:

我试图转换成 'preg_match' 但它不起作用:

也试过这样:

0 投票
3 回答
89781 浏览

php - 已弃用:函数 eregi() 已弃用

我正在尝试将值提交到数据库,但我收到一条错误消息

已弃用:第 20 和 27 行的 C:\wamp\www\OB\admin_add_acc.php 中不推荐使用函数 eregi()

这是代码: