hledger/hledger-lib/Hledger
Jonathan Dowland 8bfa382c68 feat: import: interpolate regex matches in field templates (#2009)
Replace occurrences of '\N' (where N is a positive number) in field
templates with the corresponding regular expression match group, if it
exists.

E.g. Warp the date to the first of the month for the second posting

    if %date (....-..)-..
        comment2 date:\1-01

E.g. Strip a prefix from an imported account name

    if %account1 liabilities:jon:(.*)
        account1 \1

Fixes #2009.

Signed-off-by: Jonathan Dowland <jon@dow.land>
2023-11-08 13:49:39 -08:00
..
Data ;doc: haddock, comment fixes 2023-10-21 17:58:43 +01:00
Read feat: import: interpolate regex matches in field templates (#2009) 2023-11-08 13:49:39 -08:00
Reports lib!: use styleAmounts in more places; add rounding strategies 2023-10-18 13:56:24 +01:00
Utils ;dev: add Utils.Regex.regexMatchTextGroups 2023-11-08 13:49:39 -08:00
Data.hs ref: move journal checking/pretty errors down further, to Hledger.Data 2022-05-21 18:29:13 -10:00
Query.hs imp: "type:" queries now see through aliases/pivots, like acct: (fix #2018) 2023-04-06 11:12:35 -10:00
Read.hs feat: csv: rules files can be read directly; data file can be specified 2023-05-19 09:09:21 -10:00
Reports.hs cln: tests: Remove test and tests, which are just aliases for testCase 2021-08-30 16:32:19 -10:00
Utils.hs lib: Hledger.Utils: added multicol 2023-05-18 07:19:36 -10:00