preg_split() Help
| From: | Stephen J. Taranto | Date: | Mon, 22 May 2000 18:17:48 +0000 |
| Subject: | preg_split() Help | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-297@lists.php.net to get a copy of this message | ||
Hi All. I'm having a bit of a problem with a regular expression
for preg_split(). I was hoping someone can give me a hand.
I'll have an input line like this --
<$World> blah <$ Wide> blah <$ Web >
I need a regular expression to parse this and give me an array
of ("World", "Wide", "Web"). What's throwing me for a loop at
the moment is the optional spaces before/after the <$ and >
delimiters. These spaces may or may not be there for any of
the 'fields'. For that matter there could be from 1 to n
'fields' in the input.
Anyone care to straighten me out?
Thanks!
-Steve.