关于外部命令的实际应用和原理:
![HAHW{NK]%T84N7QWDHHZ4_H.png](http://upload-images.jianshu.io/upload_images/2735954-74d293d862a3e8b1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![IP}MMTVVIF]2(WUC~1(J(PJ.png](http://upload-images.jianshu.io/upload_images/2735954-aa1ab1da8fe7e63e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
例子:
package com.dt.spark.scala.basics
import sys.process._
object HelloRegExpAndCMD {
def main(args:Array[String]){
val pattern = "[0-9]+".r
println(pattern.findFirstIn("Hello,Life is short,111,222"))
}
}
归纳总结:1.关于外部命令的实际应用和原理
2.例子