Hi,
Can someone suggest grok pattern for the following names
Mr. Rakesh Kumar Reddy
Mr Harish Shankar
Mr M. D. S. Reddy
Mr. M D S Reddy
Mr M.D.S. Reddy
These are the names that are present in Name field.
Here, I want to extract the names based on space and need to remove the single letter words.
for this I have used the grok pattern
(?<Courtesy>[\w\.]+) (%{NOTSPACE:FName})? (%{NOTSPACE:MName})? (%{NOTSPACE:LName})?
This is working fine for the names like
Mr. Rakesh Kumar Reddy
Mr Harish Shankar
For the above pattern I'm getting this result
Name : Mr. Rakesh Kumar Reddy
Courtesy : Mr
FName : Rakesh
MName : Kumar
LName : Reddy
But For the names like
Mr M. D. S. Reddy
Mr. M D S Reddy
Mr M.D.S. Reddy
I need the output like
Courtesy : Mr
FName : Reddy
which means all the single letter words should not be considered.
Can anyone suggest me a grok pattern for this?