I've uploaded it here..
http://regex101.com/r/hC2eH3/1
Let email.body =
> From: "FastTech" <[email protected]>
>
> == Ship to ==
> Example Name
>
> Shipping via Registered Airmail w/Tracking
>
> == Shipping ETA ==
>
> == Items ordered ==
>
> == Other services ==
>
>
> == Order total ==
> $2.63
>
>
>
>
> Thank you again for choosing FastTech.
>
> Kind regards,
>
> The FastTech Team
>
>
> FastTech - gadget and electronics
> http://www.fasttech.com
> [email protected]
>
>
> This email was automatically generated for
I can't get this to work in my script - using this code:
regex = r'> == Ship to == *\n. (\w+\s\w+)'
link = re.findall(regex, email.body)
print link
print link just returns
[]
When it should be matching 'Example Name'
email.body
. So maybe you have string encoding issues that get magicked away when you post theemail.body
here.\xa0
, or if your end-of-line marker is\r
or\r\n
instead of\n
.