#C1485. Extract Email Usernames

    ID: 44544 Type: Default 1000ms 256MiB

Extract Email Usernames

Extract Email Usernames

Given a single line of email addresses separated by spaces, your task is to extract the username from each email. The username is defined as the substring before the '@' character. In other words, if an email is of the form $\text{username}@\text{domain}$, then you should output $\text{username}$. For example, given the input "john.doe@example.com jane_smith@domain.org", the correct output would be "john.doe jane_smith".

inputFormat

A single line containing one or more email addresses separated by spaces.

outputFormat

A single line containing the extracted usernames separated by a space.## sample

john.doe@example.com
john.doe