There is a timestamp preceding the text in my main search, but there is also a timestamp that follows it. I'm only searching from the main search text forward: raw log text: store license for Store 123456 2022-04-07 19:17:44,360 ERROR path not found index=* host="storelog*" "store license for " |rex field=_raw "Store\s123456\n\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\,\d{3}\s(?P<errortext>.*)path" | stats count by errortext Based on my search, I would think splunk should recognize the "store license for " text, then recognize the single whitespace, then recognize the "Store\s123456" text in the regex, then recognize the newline (\n), then recognize the date/timestamp, and finally set errortext field to ERROR.
... View more