I have a list of rules and I want to filter it using a pattern for the initial string representing the name of the rule. So that in the example below it filters linearBool even if it is called "linear" or "linearity" or anything starting with "lin"
rules = {runBool -> True, linearBool -> True, ab -> 3}
FilterRules[rules, xx:lin_]
>>linearBool->True
I have tried with MatchQ and Cases but cannot get this simple think to work.
Thanks!
Comments
Post a Comment