How to extract email id from a string without using regex

I am trying to learn string manipulation and want to extract email ids from strings

For example: “Hello there, this is my email address, please send me the document”

How do I extract the email without using regex or any predefine functionalities similar to regex?

If you are not using Regex
then fallow these steps.
1- Split string with space value. It will break your string and all the words will go in in string type array.
2-loop over string array.
3- use string. contains over each iteration and check that its contains ",, and so on.

Note: Its work in case of general case, email can be from different domain. Its not reliable than Regex. Regex is perfect

1 Like

Why you don’t need regex expression @sagar.raval


Trying to learn string manipulation, trying to make projects as logical as possible without using predetermined methods

I will start using methods after some time

Hi @sagar.raval

Have a look on the tutorial for String Manipulation

Hope this will help you


thanks for the answer i wiill try that

and im just learning string manipulation, eventualkly i will use regex in production

1 Like

@sagar.raval Great. You will become master, you are thinking with different way and you have curiosity that’s amazing

1 Like

Regex Expression @sagar.raval



Hey @sagar.raval,

Have a look on this thread.


Thank you , appreciated

1 Like

i dont want to use regex right now

@sagar.raval yes use my suggestion

Hello @sagar.raval ,
Try this method it may help for you

Split(YourString," ")

You ca use the split string and loop it using for each loop , you can split each string.
Within loop , use if condition for isolate the string contains “@” “.”

item.ToString.Contains("@") And item.ToString.Contains(".")

KIndly refer this flow of XAML file.
EmailString_Manipulation.xaml (9.3 KB)


1 Like

the regex is only easy way and dynamic also if you go with string manipulation you cant get efficient


this following regex you can use for email

  1. \w-. ↩︎


FYI, more strict approach:

validMailCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&’*+-/=?^_`{|}~."
validDomainCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-."

Then check if valid character as address and domain before/after @ character.

Sequence2.xaml (10.8 KB)



This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.