You are here: Re: grab succeeding string « PHP Programming Language « IT news, forums, messages
Re: grab succeeding string

Posted by strawberry on 11/19/82 11:47

Hello again,

For various reasons, tiny little errors in the scripts provided
prohibited them from working (at least on my system). However, they got
me pointed in the right direction and, coupled with a useful
introduction to Regular Expressions at
www.sunflowerroad.com/blog/timstidbits/regular-expression-quick-tutorial-part-1/,
I was able to put together the following. I don't know if it's perfect
- but it works for my purposes so I thought I'd share it with everyone:

$watchword = 'Numbers: ';

if (preg_match("/(?<=$watchword).*?\s/s",$pagedata, $match)){
$string=$match[0];
echo $string;

Regards

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация