我有以下字符串:
property some_property_name;
@(posedge some_clock) disable iff (some_other_signal)
signalA && signalB || !($isunknown(some_other_signal)) &&
|-> !($isunknown(should_not_match_this))
endproperty
more_random_code
property some_other_property_name;
@(posedge some_clock) disable iff (some_other_signal)
signalA && signalB || \*!($isunknown(dont_match_if_commented_out))*\ &&
more_random_stuff ||
random_stuff
|-> some_other_expression
endproperty
property next_property_name;
@(posedge some_clock) disable iff (some_other_signal)
signalA && signalB || !($isunknown(some_other_signal)) &&
|-> some_other_expression && expressions_etc
endproperty
我想匹配!($ isunknown(。*))介于" @(posedge"和" | - >"。我试过的正则表达式是:
(?<=@\(posedge ) ([^*]!\(\$isunknown\(.*\)[^*]) (?=(.*\n.*)*\|->)
但它与任何东西都不匹配,我不明白为什么。
答案 0 :(得分:1)