Jump to content

Recommended Posts

Posted

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

&quot;Seth Morrison&quot; &lt;Seth.MorrisoN@Email.com&gt;</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.

Posted

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

&quot;Seth Morrison&quot; &lt;Seth.MorrisoN@Email.com&gt;</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

Posted

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!

Posted

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.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...