How to take part o string

Hi All,

I need to extract few values from the below string
= vlmdpews003.corp.intranet
source = /foss/data/instances/dvarpob/logs/dvar_composite.log
sourcetype = composite:dvar_po

“vlmdpews003.corp.intranet” and “dvarpob”
how to do that

REgards,
Hima

Hi @thima

May I know what are the constant parts in the string and which one are the ones changing always

cheers

vlmdpews003.corp.intranet This is the server name "vlmdpews.corp.intranet will not change number will change 001 to 112

" /foss/data/instances/dvarpob/logs/dvar_composite.log" this path only “dvarpo” is constant

@thima

For extracting vlmdpews003.corp.intranet please try this regex

vlmdpews\d{3}\.corp\.intranet

For extracting dvarpob plese try this

dvarpo[a-zA-Z]

You can use this in matches activity

cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.