How do I particularly separate email from paragraph?

If user pastes a paragraph containing emails example

this is a car and I know it …
[email protected]
asids aoifpjad soifjojadsf jsdoifj

The app should return " [email protected] "

sorry, I do not understand the question

Taifun

2 Likes

like i guess u mean u are trying to make an email app and u wanna add paragraphs keep the default text box and done . it will depend on the people whether they want para or not

I have edited the question. Don’t mind, my english is bad.

I want app to spot email from a paragraph given by user. I have edited the question please take a look

Use Regular expression extension - ClassicExtensions - Community extension to validate email id from the paragraph.

1 Like

Find a @ position
Walk back, and go comparing (each letter) if it equals space. " "
Take this position from space + 1
Now. from the @ position, move forward comparing (each letter) if it equals space " ".
Take the position of the space -1
You have the start position and the end position of the string.
Remove this string from the main string.

2 Likes

He can’t do that because the texts and length of the paragraph may change and he will not get the desired result. :sweat_smile:

1 Like

Maybe try something like this

2 Likes

This post was flagged by the community and is temporarily hidden.

This post was flagged by the community and is temporarily hidden.