Re: Get text between A and B?
From: Philipp Lenssen (info_at_outer-court.com)
Date: 11/18/03
- Next message: Philipp Lenssen: "PHP5 questions"
- Previous message: bof: "ImageTTFText can't find/open ttf fonts"
- In reply to: Justin Koivisto: "Re: Get text between A and B?"
- Next in thread: Matty: "Re: Get text between A and B?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 Nov 2003 11:21:17 GMT
Justin Koivisto wrote:
> Kinda like this then...
>
> function getTextBetween($allText,$textBefore,$textAfter,$offset=0){
> $pattern='#'.$textBefore.'(.*)'.$textAfter.'#iU';
> preg_match_all($pattern, $allText,$matches);
> return $matches[1][$offset];
> }
Thanks to that solution, and the other ones as well (I merged two
together). Works very nice.
- Next message: Philipp Lenssen: "PHP5 questions"
- Previous message: bof: "ImageTTFText can't find/open ttf fonts"
- In reply to: Justin Koivisto: "Re: Get text between A and B?"
- Next in thread: Matty: "Re: Get text between A and B?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]