Re: Case insensitive 'split' regex function?
| From: | John Parker | Date: | Tue, 20 Jun 2000 12:06:58 +0000 |
| Subject: | Re: Case insensitive 'split' regex function? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-21828@lists.php.net to get a copy of this message | ||
> True, but the same argument could be applied to ereg() / eregi() and
> ereg_replace() / eregi_replace(), where there's a specific case
> insensitive version of the function as well as a case sensitive version.
>
> ie: I know I could reformat the regex string to be case insensitive, but
> it would seem to fit into the current scheme of things if there was a
> separate 'i' version of the split function. (It would also be considerably
> less hassle for complex patterns.)
>
> Only an idea.
>
> JP.
>
> ----------
> From: Stefan Livieratos
> Sent: Tuesday, June 20, 2000 12:43 pm
> To: John Parker; 'PHP Dev List'
> Subject: Re: [PHP-DEV] Case insensitive 'split' regex function?
>
> Hi,
>
> split works with regex. The following script ...
>
> <?php
>
> $a = "ffffDfffffdGGGGGDjjjj";
>
> $b = split("[Dd]",$a);
>
> print count($b);
>
> ?>
>
> ... yields 4 as a result.
>
> Regards
> Stefan Livieratos
>
> -----Urspr¸ngliche Nachricht-----
> Von: John Parker <jparker@itchannel.net>
> An: 'PHP Dev List' <php-dev@lists.php.net>
> Gesendet: Dienstag, 20. Juni 2000 13:12
> Betreff: [PHP-DEV] Case insensitive 'split' regex function?
>
>
> > Sorry, if this is the wrong list, but...
> >
> > I don't suppose some kind hearted soul would like to add a case
> insensitive
> > version of the 'split' regex function to cvs? (I'd do it myself if I
> hadn't
> > flogged my C experience for a copy of Photoshop many, many moons ago.)
> >
> > Bearing in mind the current regex function's naming conventions, this
> would
> > presumably be 'spliti'?
> >
> > Comments / feedback, etc. ?
> >
> > Regards,
> > John Parker.
> >
> >
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-dev-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
> >
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>