Questions tagged [eregi]

PHP function for case insensitive regular expression matching

https://php.net/manual/en/function.eregi.php

Deprecated as of PHP 5.3.0 in favor of .
Removed as of PHP 7.0.0.

See also How can I convert ereg expressions to preg in PHP? on the required regex delimiters.

89 questions
0
votes
3 answers

function egeri() doesn't work

I have this code but, when I logged in habbo the function doesn't work for the image online, it just shows the image offline:
user3133630
  • 3
  • 1
  • 2
  • 5
0
votes
1 answer

I need help about this old code ereg_replace

Good morning from Italy and sorry for my bad English :) In to an old web application i need to make some change but i receive this warning : ereg_replace is deprecated etc etc I try to change…
geomo
  • 139
  • 1
  • 1
  • 15
0
votes
2 answers

Changing eregi in preg_match doesn't work

I have this code in my PHP form : function IsEmail($email) { $pattern = "^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,7}$"; return (eregi($pattern,$email)) ? true : false; }; And my local server gives me an error : Function eregi()…
user2891155
  • 67
  • 3
  • 9
0
votes
1 answer

PHP - How to replace eregi code by preg match

Hi I have the following code that that uses the eregi() function that PHP is saying is depreciated. I am trying to convert it into a replacement function (preg match) but im not too sure how to go about it as I am new to preg match function. eregi…
M9A
  • 3,168
  • 14
  • 51
  • 79
0
votes
1 answer

PHP Convert eregi() string to preg_match or preg_replace

please can someone help me with convert this string from eregi() to preg_match or preg_replace? Thank you very much! $eregicheck = "^([-!#\$%&'*+./0-9=?A-Z^_`a-z{|}~])+@([-!#\$%&'*+/0-9=?A-Z^_`a-z{|}~]+\\.)+[a-zA-Z]{2,4}\$";
saby
  • 351
  • 1
  • 2
  • 18
0
votes
2 answers

PHP finding a match eregi?

I have this code here $search = $_SERVER['HTTP_USER_AGENT']; The Search returns Mozilla/5.0 (Android; Tablet; rv:14.0) Gecko/14.0 Firefox/14.0 This find is inside an array $find = '(Nexus 7) | ((Android) && (Tablet))'; This if statement is inside…
user2327201
  • 409
  • 3
  • 9
  • 20
0
votes
2 answers

convert eregi to php 5.3

Does anyone know how I would convert the following code to php 5.3? if (eregi('^(' . $value . ')(;q=[0-9]\\.[0-9])?$', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) { Thanks -James
jimbeeer
  • 1,604
  • 2
  • 12
  • 25
0
votes
1 answer

Convert eregi to preg_match and ereg_replace to preg_replace

Im using http://www.internoetics.com/2010/01/12/simple-whois-php-script/ PHP whois script and i need to config it for newest PHP version, i need convert ereg and eregi to preg_match and preg_replace if ( (!eregi('^[a-zA-Z0-9-]+\.([a-zA-Z]{2,4})$',…
Null
  • 518
  • 7
  • 13
0
votes
1 answer

Eregi to preg_match conversion

So, I have a website in which I gather data directly from another associated website, in order to display information. To do this, I am fetching the website (using file_get_contents) and stripping out anything not relevant using eregi. My problem is…
CmdrSharp
  • 1,085
  • 13
  • 30
0
votes
1 answer

Alternative Function for EREGI in PHP

I was making a contact form again and eregi() is being used on it. But as we all know, the eregi() function has been deprecated on PHP 5.3 so I want to know what alternative function/s can I use to replace the function eregi()? I've tried…
0
votes
1 answer

Form not sending, function eregi() is deprecated

Possible Duplicate: How can I convert ereg expressions to preg in PHP? Escape string to use in mail() I am trying send my form, but I get this error... Deprecated: Function eregi() is deprecated I tried replacing it with preg_match(), but no…
0
votes
1 answer

Another eregi replacement issue, for web page navigation

My hosts recently updated their PHP to 5.3 (without warning) and I now have to replace the code for my page navigation on my index page. This is what I'm currently using:
0
votes
2 answers

DOT Validetor Using if (eregi

Is it possible to use a dot . checker in a email form, so that if specific field have a dot, then this will tell the user to do not put dot in those field. I have tried with this but don't works: if (eregi('.', $notes)) { die ("Do NOT PUT DOT…
blömpæ
  • 375
  • 2
  • 12
0
votes
1 answer

How to convert eregi to preg_match

How can I convert this to preg_match? $urlregex =…
Bonfocchi
  • 523
  • 3
  • 10
  • 19
0
votes
1 answer

PHP eregi and eregi_replace confusion

I'm attempting to count the words in a textarea field. Below is a simple function, that uses the deprecated eregi and eregi_replace. I know I can swap those two functions with preg_match, and preg_replace, but I'm missing what's after that. I'm…
coffeemonitor
  • 12,780
  • 34
  • 99
  • 149