recycles Posted October 21, 2009 Share Posted October 21, 2009 Hi. I am looking for ideas to solve this problem: In a simple text file, I have two pattern strings. Let's call them XXXXX and ZZZZZ. Using Php, I want to find XXXXX and print out XXXXX along with everything in between until I come to ZZZZZ and print out ZZZZZ too. I am new at using Php. If you can't share some code examples, can you just point me to some functions that will do the trick? I can read about the functions and figure it out, but I just need to know where to look. Thanks in advance for your help. Link to comment https://forums.phpfreaks.com/topic/178492-newbie-looking-for-solution-ideas/ Share on other sites More sharing options...
cags Posted October 21, 2009 Share Posted October 21, 2009 Something like this should work. preg_match('~XXXXX(.*?)ZZZZZ~', $input, $out); Link to comment https://forums.phpfreaks.com/topic/178492-newbie-looking-for-solution-ideas/#findComment-941282 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.