Hi All,
Please find the below mentioned inputs
- /abcd/efgh/yj/kl/mn/op
- abcd/efgh/yj/kl/mn/op
- abcd
- /abcd
- abcd/
Output Required: servicename = abcd
I have tried two grok parser
- (/)?%{DATA:servicename}/ ==> Making last / mandatory
- (/)?%{DATA:servicename}(/)? ==> Nothing is coming in servicename field
Can you please help me regarding the same?
Regards,
Debashis