On Wed, August 1, 2007 10:05 pm, Jack Bates wrote:
> I'm trying to pull all the components out of strings structured like:
> word followed by any number of ( dot word or square bracketed string )
>
> This is an example: foo.bar[ab.cd].baz
>
> From the above example, I want: array('foo', 'bar', 'ab.cd', 'baz');

preg_match_all('|([^\\[\\[\\.]+)|', $text, $matches);
var_dump($matches);

should get you going down the right path...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to