String Extraction
-
Hello All, I am scraping some text from a html page and writing to a text file. after every line extraction i am adding the text to list & in the end i am writing to a text file. in one pass i am getting text as Email: ptadeep.g@someemail.com Membership Type: in this line i want only the email id , Please is there any method to remove the words Email & Membership Type from the string and then add only email id to list ??
-
Hello All, I am scraping some text from a html page and writing to a text file. after every line extraction i am adding the text to list & in the end i am writing to a text file. in one pass i am getting text as Email: ptadeep.g@someemail.com Membership Type: in this line i want only the email id , Please is there any method to remove the words Email & Membership Type from the string and then add only email id to list ??
-
Hello All, I am scraping some text from a html page and writing to a text file. after every line extraction i am adding the text to list & in the end i am writing to a text file. in one pass i am getting text as Email: ptadeep.g@someemail.com Membership Type: in this line i want only the email id , Please is there any method to remove the words Email & Membership Type from the string and then add only email id to list ??
if you have problems dealing with strings, the natural approach is to read up on the String class. It has a lot of methods, and whatever your problem is, there will be one or more solutions. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
String.Split()[^] should do the job.
It's time for a new signature.
-
Hello All, I am scraping some text from a html page and writing to a text file. after every line extraction i am adding the text to list & in the end i am writing to a text file. in one pass i am getting text as Email: ptadeep.g@someemail.com Membership Type: in this line i want only the email id , Please is there any method to remove the words Email & Membership Type from the string and then add only email id to list ??
Regex is your friend. /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
Hello All, I am scraping some text from a html page and writing to a text file. after every line extraction i am adding the text to list & in the end i am writing to a text file. in one pass i am getting text as Email: ptadeep.g@someemail.com Membership Type: in this line i want only the email id , Please is there any method to remove the words Email & Membership Type from the string and then add only email id to list ??
Substring, Regex, IndexOf.