Splunk Search

How to get regex named capture group based on back reference for field extraction?

Pat
Path Finder

When doing an extracted field can the regex named capture group be based on a back reference.  The idea is I would have an unamed capture group followed by a named capture group using /1 as the name so the name is what was first captured in the unamed group.  I know the following does not work but im hoping some small change might make it work:

(?<\1>.*?)

Labels (1)
Tags (1)
0 Karma

Pat
Path Finder

can't seem to edit but wanted to mention I tried

 (?<$1>.*?)

as well

0 Karma
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...