John117 Posted October 6, 2008 Posted October 6, 2008 Hey guys, in the middle of some html I have the following string. - The address name may be different. But always the same domain part of the email. I need to apply the first and last name to variable so that I can use them This is an example found in the html "Seth Morrison" <Seth.MorrisoN@Email.com></div><div class="clearFloat"></div></div> I am having trouble figuring out how to parse it. - since the name length will vary as well as the position. Please Help -No I am not using this to spam, I own a domain and need to save the catch all addresses used.
Szhlopp Posted October 6, 2008 Posted October 6, 2008 Hey guys, in the middle of some html I have the following string. - The address name may be different. But always the same domain part of the email. I need to apply the first and last name to variable so that I can use them This is an example found in the html "Seth Morrison" <Seth.MorrisoN@Email.com></div><div class="clearFloat"></div></div> I am having trouble figuring out how to parse it. - since the name length will vary as well as the position. Please Help -No I am not using this to spam, I own a domain and need to save the catch all addresses used. I'd need more examples of the HTML to be sure. But I think this should do it: $aNameArray = StringRegExp($HTML, ";([[:alnum:]]*?)\.([[:alnum:]]*?)@", 3) $aNameArray[0] = First name $aNameArray[1] = Last name RegEx/RegExRep Tester!Nerd Olympics - Community App!Login UDFMemory UDF - "Game.exe+753EC" - CE pointer to AU3Password Manager W/ SourceDataFiler - Include files in your au3!--- Was I helpful? Click the little green '+'
John117 Posted October 6, 2008 Author Posted October 6, 2008 I'd need more examples of the HTML to be sure. But I think this should do it: $aNameArray = StringRegExp($HTML, ";([[:alnum:]]*?)\.([[:alnum:]]*?)@", 3) $aNameArray[0] = First name $aNameArray[1] = Last name :-) It'll take me a week to understand that, but it works, and now I can continue on! Thank you so much!
archgriffin Posted October 7, 2008 Posted October 7, 2008 People that can do regular expression stuff quickly always amaze me. I just have not had a chance to really sit with it and get in to it, though I do find the cheat sheets useful when I do attempt to use them.http://www.addedbytes.com/cheat-sheets/reg...ns-cheat-sheet/ "Human kind cannot gain anything without first giving something in return, to obtain; something of equal value must be lost."The Help File is truly your friend.
JRowe Posted October 7, 2008 Posted October 7, 2008 I think it takes months or years of consistent use across a broad range of applications before you get to be really good. I've been working with them whenever I get a chance, but it's a pain in the arse to try to study them without having something particular to do. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now