|

楼主 |
发表于 2004-2-13 15:20:49
|
显示全部楼层
[PHP] $string = "This 14.34";
$string =~ /-?(d+).?(d+)/;
print "$1\n";
print "$2\n";
print "$&\n";[/PHP]
I'm sorry, i typed wrongly. i am new in learning perl. above is the right one.
still that question, i don't understand the function of "-?" and "?" above.
can any one help me? thanks! |
|