Re: converting string into array with regex
| From: | Adam i Agnieszka Gasiorowski FNORD | Date: | Sat, 06 Dec 2003 07:33:11 +0000 |
| Subject: | Re: converting string into array with regex | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-172051@lists.php.net to get a copy of this message | ||
"CPT John W. Holmes" wrote:
> From: "Adam i Agnieszka Gasiorowski FNORD" <agquarx@venus.ci.uw.edu.pl>
>
> > No, no spaces between letters (otherways
> > it would be very easy, indeed). So there is
> > no way to match the "space between alphanumeric
> > chars" and split on it? I was trying to avoid
> > the loop solution.
>
> Of course there is. In fact, this example, direct from the manual, does
> exactly what you want...
>
> <?php
> $str = 'string';
> $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY);
> print_r($chars);
> ?>
> Imagine that!---John Holmes...
LOL! :8]]
You are SO right. I just KNEW the
solution existed, I must have even read
it a long time ago in the very manual...
Sorry for wasting your precious time :8].
Thank you and all the others that tried
to help!
--
Seks, seksić, seksolatki... news:pl.soc.seks.moderowana
http://hyperreal.info { iWanToDie } WiNoNa ) (
http://szatanowskie-ladacznice.0-700.pl
foReVeR( * )
Poznaj jej zwiewne kształty... http://www.opera.com 007