Getting delimiter from a line

Hi

Can someone please tell me the best possible way to find the delimiter from a given line (not including the spaces)?

For our convenience we can assume use the email address to split if necessary. So the very next char (except space) after the email can be our delimiter. But there may be cases where the email address is at last and no delimiter are there.

Some examples are:

Ex 1:

Code:

`jon, doe, abc@gmail.com, 996655`

Ex 2:

Code:

`abc@gmail.com; doe; ;996655`

Ex 3:

Code:

`jon# doe# 996655# abc@gmail.com`

Ex 4:

Ex 5:

Code:

`jon doe 996655 abc@gmail.com`

In ex 4 and 5 above, it should return as no delimiter found.

Any help is appreciated.

Thanks