On 28.02.18,05:26, Radoslaw Jurga wrote: > Hi. I'm trying to do some automated transactions using the following regex: > > /^Assets:(?=Livret A|LinXea)/ > > > > The expression I would like to get to work is > > = expr account =~ /^Assets:(?=Livret A|LinXea)/ and amount > 0.0 > > > > However this gives the following error: > > While parsing value expression: > > account =~ /^Assets:(?=Livret A|LinXea > > > > While parsing automated transaction: > > > = expr account =~ /^Assets:(?=Livret A|LinXea)/ and amount > 0.0 > > Error: Missing '/' > > > > Here are alternatives that work, but do not achieve what I am looking to do: > > = expr account =~ /^Assets:Livret A/ and amount > 0.0 > > > This only triggers for one of the accounts. > > > > = /^Assets:(?=Livret A|LinXea)/ > > This does not trigger for positive amounts only, but for negative too. > > I guess I can split it up in two automated transactions with each a simpler > regex. But I would like to see if there is a better solution? >
Will this expression work for you? = expr account =~ /^Assets:?=Livret A or ^Assets:LinXea/ and amount > 0.0 Jostein -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
