Posted by elyob on 12/07/05 15:51
"Erwin Moller"
<since_humans_read_this_I_am_spammed_too_much@spamyourself.com> wrote in
message news:4396e821$0$11071$e4fe514c@news.xs4all.nl...
> elyob wrote:
>
>> Hi, I'm looking at pulling a string from a source file and am wondering
>> the best way to do this. I have a starter and ender quote but am just
>> wondering the best way to do this? Regular expressions?
>>
>> Thanks
>
> Easiest way without regexpr is using:
> substr()
> and
> strpos()
>
> Use strpos to find the position of the starterquote and also for endquote.
> Use substr to retrieve the part inbetween.
>
> check at www.php.net for usage.
> It is really very straightforward (when you know the functionnames. :P )
>
Thanks, I just thought I'd try that before you posted, I've now got the
string out succesfully! The strstr function was also very useful.
Thanks
[Back to original message]
|