|
Posted by Oli Filth on 11/23/05 17:12
Harry wrote:
> Hi!
>
> I'm trying to know if a substring or another string, using ereg.
>
> ereg ($substring, $string)
>
> My problem is that $substring contains characters like '[' and ']',
> which are use for identifying classes in regular expressions, so I
> obtain an error message every time I use it as in this example.
>
> How can I solve it? Is there any option to make ereg not evaluate '['
> and ']'. Or is there any other function that allows to compare two
> substrings, saying if one is substring o another?
>
strpos()
--
Oli
Navigation:
[Reply to this message]
|