Forum Moderators: coopster

Message Too Old, No Replies

Searching problems

Its doin my ead in :(

         

kermey

12:56 pm on Jan 18, 2004 (gmt 0)

10+ Year Member



Im trying to search a string using eregi, but its not finding what i want even though i know that its there.

If i had a string "aaabbbbaaa" and searched for bbbb, would it find it? or is there another better way to do this?

justageek

1:45 pm on Jan 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could use stristr.

JAG

sabai

3:52 pm on Jan 18, 2004 (gmt 0)

10+ Year Member



or
substr_count

Romeo

9:33 pm on Jan 18, 2004 (gmt 0)

10+ Year Member



... or
if (preg_match("/bbbb/",$longstringvariable)) {
echo "found!\n";
}

Regards,
R.

g1smd

12:09 am on Jan 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What are the major differences between each of those, and their limitations?