You are here: Re: How do you split a string using split()? « PHP Programming Language « IT news, forums, messages
Re: How do you split a string using split()?

Posted by geeker87@gmail.com on 05/18/06 03:15

Your regular expression would probably look something like this:

/^b(.+)\r/

For a line that begins with the letter 'b' is followed by one or more
'anything', ending with '\r'.

You would split the file into multiple lines with split(), then pass
each line to preg_match as $inputLine.

So you could use:

$numParts = preg_match($expression,$inputLine,$arrMatches);

Maybe theres a simpler way, I'm tired |-)

 

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

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