You are here: Re: Recursive regular expression (or alternative) « PHP Programming Language « IT news, forums, messages
Re: Recursive regular expression (or alternative)

Posted by <corff on 04/13/06 08:36

In comp.lang.perl.misc André Hänsel <andre@webkr.de> wrote:

: Or in words: In a configuration file I have _nested_ conditional blocks
: in the format (condition)?{content_when_true}:{content_when_false}
: while the false content ist optional.

Hint "configuration file": CPAN has a number of configuration file modules,
did you have a look at them?

Hint "nested": Nested data are preferrably tackled by a parser, not a regex.

: If you have any completly different solution I'll be glad to hear it,
: too. :)

Yes. The XML::Simple module. You have full control over your nested data
structures and can easily evaluate branches of your data conditionally.
Provided, however, that your regex in the beginning didn't describe your
final data format but rather a model of what you want to achieve.

Oliver.

--
Dr. Oliver Corff e-mail: corff@zedat.fu-berlin.de

 

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

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