php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11253 eregi slight mistak?
Submitted: 2001-06-02 11:11 UTC Modified: 2002-06-02 13:34 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: digirave at hanmail dot net Assigned:
Status: Not a bug Package: Regexps related
PHP Version: 4.0.4 OS: windoze
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
31 - 26 = ?
Subscribe to this entry?

 
 [2001-06-02 11:11 UTC] digirave at hanmail dot net
posted this in the notes at eregi too...

i'm not sure if this is a bug or built in, i think it may be a bug, anyways this took a lot of my time, 

let's say your searching for several characters in $domain 
if(ereg("[abc]", $domain)) 
-> no problem! 

but let's say you want to search abc] normally you add a slash in front of special characters and it works but it doesn't work for ] 
if(ereg("[abc\]]", $domain)) 
-> SCREWS UP.. DOESN'T SEARCH PROPERLY 

the quick fix? 
if(ereg("[abc\x5d]]", $domain))

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-07 16:14 UTC] digirave at hanmail dot net
posted this in the notes at eregi too...

i'm not sure if this is a bug or built in, i think it may be a bug, anyways this took a
lot of my time, 

let's say your searching for several characters in $domain 
if(ereg("[abc]", $domain)) 
-> no problem! 

but let's say you want to search abc] normally you add a slash in front of special
characters and it works but it doesn't work for ] 
if(ereg("[abc\]]", $domain)) 
-> SCREWS UP.. DOESN'T SEARCH PROPERLY 

the quick fix? 
if(ereg("[abc\x5d]", $domain))


 [2002-06-02 13:34 UTC] derick@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 18:02:40 2024 UTC