How to use $1 capture group from regexp:AdvancedParser as a datastore key

:bullseye: What is your goal?

I use regexp:AdvancedParser (module 111) with this pattern:
topic_id: ([\w-]+) | label: ([^|]+) | article_date: ([\d-]+) | newspaper: (.+)

I need to use only the first capture group ($1, the topic_id) as the Key in a downstream datastore module. The picker only shows “Fallback Match” which contains the entire matched string, not the individual groups.

:thinking: What is the problem & what have you tried?

The Fallback Match pill inserts the full match string (e.g. “topic_id: energy-crisis | label: …”) instead of just “energy-crisis”. I need only $1. I tried using Name and Value pills but those are not the capture groups. How do I access individual capture groups ($1, $2 etc.) from regexp:AdvancedParser in subsequent modules?

Hey there,

the fallback match should only trigger if nothing else was found. Can you show a screenshot of the module, how its setup, what the input text is (if possible) and what you are getting as a result?

Many thanks for your kind and prompt answer. Are rhe attached screenshots helping?

Took me a while to figure this out — you need to map the $1 output from the Text Parser module directly into the Datastore key field rather than hardcoding it. Just make sure your regex actually captures the group correctly first, otherwise the key ends up empty and the whole scenario breaks silently. Test the parser step in isolation before wiring it into the datastore.