我無法弄清楚如何通過我通過Python發佈的grep命令來匹配此模式。Python發佈的grep正則表達式匹配此模式
我想匹配的
foo.bar([anything including newlines, spaces, tabs])
形式的字符串。
我,試圖:
regex = " foo.bar(.*) "
bashCommand = "grep"+" -r -h"+regex+baseDir
process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE)
requires = process.communicate()[0]
但我不匹配這個字符串
dojo.require("abc.def"
);