I want to write a regex which fetch out the whole name like I have Mr. Dheeraj S Agrawal then I should get object like:
{prefix: 'Mr.', firstname: 'Dheeraj', middelname: 'S', lastname: 'Agrawal'}
There could be a case if user entered like Mr. Dheeraj, Mr. Dheeraj Agrawal, Dheeraj Agrawal so in this cases that object key will contain blank:
{prefix: 'Mr.', firstname: 'Dheeraj', middelname: '', lastname: ''}
