我是 ionic 的新手,我仍在尝试安装它。每次我写一个离子命令,就像npm install -g ionic cordova我收到这个错误一样
npm ERR! Unexpected end of JSON input while parsing near '...de":"0.6.2","express"'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\DwayneT\AppData\Roaming\npm-cache\_logs\2019-05-31T01_51_23_542Z-debug.log
Run Code Online (Sandbox Code Playgroud)
'
这是我的日志文件
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli
'C:\\Users\\DwayneT\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-
cli.js',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'ionic',
1 verbose cli 'cordova' ]
2 info using npm@6.9.0
3 info …Run Code Online (Sandbox Code Playgroud) 我有一个字符串,我想提取其中的浮动.我已经使用matcher.group()函数成功完成了它,但我只想单独显示它们.这是我的代码
String regex="([0-9]+[.][0-9]+)";
String input= "You have bought USD 1.00 Whatsapp for 784024487. Your new wallet balance is USD 1.04. Happy Birthday EcoCash for turning 7years. Live Life the EcoCash Way.";
Pattern pattern=Pattern.compile(regex);
Matcher matcher=pattern.matcher(input);
while(matcher.find())
{
System.out.println("First float is "+matcher.group());
}
}
Run Code Online (Sandbox Code Playgroud)
我得到的答案是:第一个浮点数是1.00第一个浮点数是1.04
但我想说:第一个浮点数是1.00秒浮点数是1.04
我怎么做?