|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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))
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 06:00:01 2025 UTC |
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))