Hello. I am trying to get some info from a message field using regular expressions. Concretely I want to get what's after certain keywords. This is the regex:
(?<="title" :)(.+?)(?=,)|((?<="description" :)(.+?)(?=,))
Now the problem is that when I run this on the kibana grok debugger it does not return all the text, just the first match.
For example with this json:
[{
"image": {
"url": "/path/toimages/images.jpg",
"alt": "Hotels"
},
"title": "Hotels",
"description": "The best places to stay in the city",
"elements": [{
"text": "Hotels",
"action": {
"type": "EVENT",
"name": "anyname",
"entities": {
"reply": "reply",
"option": "nameofoption",
"query": "thequery"
}
}
}]
}]
The response of the regex is:
{
"response": " \"Hotels\""
}
However when using regexr.com the text after title and the text after description are highlighted:
Does the regex used in grok support this kind of aggregation of text using the | operator?