var data = response.body console.log("Johnny in fact likes to eat" + data.match(/Johnny likes to eat(.*)for breakfast/)[1]) console.log("Johnny eats nothing")
我试图学习functional,并解决一个简单的问题--替换字符串中包含的\'或\\:val data : String = "\' this is a test \\ "data.toCharArray.foldLeft(""){ (x, y) => x match { case head :: tail =>
if head == '\''
在继续执行下面的代码之前,我希望对两个条件进行初步检查。如果两者都没有返回匹配,我希望Node.js停止任何进一步的处理。我不确定是否应该将我的主要代码包装在if函数中,或者只是将此作为检查留在代码的头部。= customervalue) {} else{
// make Node.js stop e