php-general | 2000071
Date: 07/13/00
- Next message: Jeff Warrington: "Re: [PHP] replacing HTML string data"
- Previous message: Jason Bryner: "Re: [PHP] redirection..."
- In reply to: Javier Leyba: "[PHP] Regular Expresion Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 13 Jul 2000, Javier Leyba wrote:
>
> Hi !
>
> I'm porting a Perl application to PHP4. All went well till I've tried to split an string with the following code:
>
> in Perl the program did: my ( <email protected>) = split (/[^\w\+\-]/, $mio); ok
>
> in PHP I've tried to do: $token = split("/[^\w\+\-]/", $mio); without success.
>
> Could someone help me ?
Use this:
$token = preg_split("/[\w\+\-]/", $mio);
-Andrei
Any sufficiently advanced Operating System
is indistinguishable from Linux.
- Jim Dennis
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jeff Warrington: "Re: [PHP] replacing HTML string data"
- Previous message: Jason Bryner: "Re: [PHP] redirection..."
- In reply to: Javier Leyba: "[PHP] Regular Expresion Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

