oleg-shilo / codemap.vscode

Code map (syntax tree) of the active document
MIT License
84 stars 28 forks source link

[help]how to use match group from "pattern" key in other key? #73

Closed iamqiz closed 1 year ago

iamqiz commented 1 year ago

for example: want to match line : aaa/bbb/ccc use pattern: bbb/(.*) here group (.*) will match "ccc" how can I use the group in other key, for example , "clear" "prefix" ?

iamqiz commented 1 year ago

i think this feature is very important ,if not support, please support ,thanks!😘

oleg-shilo commented 1 year ago

Regex-based mappers (generic mappers) are a very convenient way of creating custom mappers without writing the code but defining the mapping rules via configuration. Though they are limited because of their declarative nature and cannot be used for advanced mapping scenarios.

In such cases, you should dedicate mappers (see here) where you can rely on the full power of the programming language.

iamqiz commented 1 year ago

Oh nice! thanks for your help !!!!!