cause1=2, cause2=2) What is P(output2

问题描述 投票:1回答:1

我有这两行字。

What is P(output1|cause1=2, cause2=2)
What is P(output2|cause3=2)

我想把它改成:

method_to_use(model, {"cause1": 2, "cause2": 2}, "output1")
method_to_use(model, {"cause3": 2}, "output2")

This is my regex:

.*P[(]([a-z1-9]+)[|](([a-z1-9]+)=([1-9]),?)+[)]

我想把它替换成这样:

method_to_use(model, {"$3": $4}, "$1")

但我只得到了该组的最后一个拟合值:

method_to_use(model, {"cause2": 2}, "output1")

有没有可能做一个 "循环",然后在途中改变所有的拟合?

regex sublimetext3 regex-group
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.