- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Search comma surrounded phrase in _raw using rex
sai_shreyashi_p
New Member
09-08-2019
11:26 PM
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

richgalloway

SplunkTrust
09-09-2019
05:12 AM
This may help.
... | rex "en,(?<country>\w+)"
---
If this reply helps you, Karma would be appreciated.
If this reply helps you, Karma would be appreciated.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sai_shreyashi_p
New Member
09-10-2019
12:09 AM
actually in the data it isn't necessary for the country to be preceded by 'en' which is why I was facing issues.
Is there any way to look for strings like ",us," or ",jp,"? Regex or rex expression for looking in _raw?
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

richgalloway

SplunkTrust
09-10-2019
05:58 AM
If the sample data above is accurate then this should work:
... | rex ",(?<lang>\w+),(?<country>\w+)"
---
If this reply helps you, Karma would be appreciated.
If this reply helps you, Karma would be appreciated.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

harsmarvania57
Ultra Champion
09-09-2019
04:58 AM
Hi,
If you provide full sample raw data then community member will able to help on regex side.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sai_shreyashi_p
New Member
09-10-2019
12:12 AM
Sorry for the vague description of data but actually this data cannot be exposed.
They are mainly comma separated values in the middle of which we have language code,country code.
They are somewhere in the middle of _raw.
Ex: 324724588,nhiden-niuen-jkjl,en,us,6484-47934......,...
