what I need is not email validation..
Its simple.
Allow @hello.world or @hello_world or @helloworld but @helloworld. should be taken as @helloworld so as @helloworld?
In short check for alphabet or number after . and _ if not than take the string before it.
My existing RegEx is /@.([A-Za-z0-9_]+)(?=\?|\,|\;|\s|\Z)/ it only cares with @helloworld and not the @hello.world or @hello_world.
Update:
So now I got a regex which deals with problem number 1. i.e. Allow @hello.world or @hello_world or @helloworld but still What about @helloworld. should be taken as @helloworld so as @helloworld?
New RegEx:
/@([A-Za-z0-9+_.-]+)/