06/02/2018 06:00:37 AM
LogName=Application
SourceName=MSSQLSERVER
EventCode=18456
EventType=0
Type=Information
ComputerName=pwchdstgdw01.camilo.net
User=NOT_TRANSLATED
Sid=S-1-5-21-825750147-1553096506-3895987836-639042
SidType=0
TaskCategory=Logon
OpCode=None
RecordNumber=1185644
Keywords=Audit Failure, Classic
Message=Login failed for user 'M-core\caadmin'. Reason: Failed to open the explicitly specified database 'SSCap'.
[CLIENT: 10.97.41.171]
@atulod1 please add more details on what you need to extract using rex. Based on the data seems like you are you are using Windows Event Viewer Logs which should be automatically extracted as fields in Splunk.
Also while posting question on Splunk Answers make sure you mask/anonymize any sensitive information like User Id, database, Computer Name etc.