Reply to split with regex

Your name:

Reply:


Posted by Patrick on 05/04/07 17:35

Hello All,

Been beating my head on the wall trying to get this working. Especially
because of my *tweener level of php and regex experience.

I have this $filename = C17AA001.000

I want to split it like this $a = C17AA $b = 001 $c = .000

I have tried this but can't get it to work.

list($a, $b, $c,) = split("^[0-9a-zA-Z]{5}[0-9]{3}\.[0-9]{3}",$filename);

echo $a;
echo $b;
echo $c;

What am I missing here? Two days of googling and php.net have not
cleared me up.

Patrick



*tweener - between novice and guru

[Back to original 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

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