The //'s around the ? treat the first paramater of the split() function as a 
regular expression, which treats the question mark as a special character 
(saying to match the preceding char(s) zero or one time).  If you're trying 
to split $testdata with an actual question mark, try using quotes instead of 
//'s or escape the question mark with a backslash.

one way:
split( "?", $testdata );

or another:
split( /\?/, $testdata);

and I'm sure there are others... :)

Jason

If memory serves me right, on Thursday 31 January 2002 11:02, Darren Simpson 
wrote:
> hi. i keep getting wierd errors when i try to split a string. the string
> is
>
> split(/?/,$testdata);
>
> the error i get is
>
> /?/: ?+* follows nothing in regexp
>
> what does it mean
>
> Thanks

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to