On 2020-12-29, jak wrote:
>
> you could try this way:
>
> # ---
> from dns import resolver as dns
>
> emails=['john@fakeserver.bah',
> 'john@gmail.com']
>
> for ue in emails:
> try:
> mxl = dns.resolve(ue.split('@')[1], 'MX')
> except:
>
Il 29/12/2020 02:48, Bischoop ha scritto:
On 2020-12-28, Mats Wichmann wrote:
On 12/28/20 10:46 AM, Marco Sulla wrote:
On Mon, 28 Dec 2020 at 17:37, Bischoop wrote:
I'd like to check if there's "@" in a string and wondering if any method
is better/safer than others. I was told on one
On 2020-12-28, Michael Torrie wrote:
> On 12/28/20 10:46 AM, Marco Sulla wrote:
>> On Mon, 28 Dec 2020 at 17:37, Bischoop wrote:
>>>
>>> I'd like to check if there's "@" in a string and wondering if any method
>>> is better/safer than others. I was told on one occasion that I should
>>> use is
On 12/28/20 8:02 PM, Chris Angelico wrote:
>
> Yes, many such regexes exist, and they are *all wrong*. Without
> exception. I don't think it's actually possible for a regex to
> perfectly match all (syntactically) valid email addresses and nothing
> else.
>
> ChrisA
Since Email addresses are
On 2020-12-28, Mats Wichmann wrote:
> On 12/28/20 10:46 AM, Marco Sulla wrote:
>> On Mon, 28 Dec 2020 at 17:37, Bischoop wrote:
>>>
>>> I'd like to check if there's "@" in a string and wondering if any method
>>> is better/safer than others. I was told on one occasion that I should
>>> use is
Thanks, Chris,
I am not actually up-to-date on such messaging issues but not shocked at
what you wrote. Years ago I recall most messages going out of my workplace
looked like machine!machine2!ihnp4!more!evenmore!user with no @ in sight and
as you mention, you may want to send to a domain and have
On Tue, Dec 29, 2020 at 10:08 AM Avi Gross via Python-list
wrote:
>
> This may be a nit, but can we agree all valid email addresses as used today
> have more than an @ symbol?
>
> I see it as requiring at least one character before the @ that come from a
> list of allowed characters (perhaps not
This may be a nit, but can we agree all valid email addresses as used today
have more than an @ symbol?
I see it as requiring at least one character before the @ that come from a
list of allowed characters (perhaps not ASCII) but does not include the
symbol @ again. It is normally followed by
On 12/28/20 1:27 PM, Richard Damon wrote:
> Validating that it meets the SYNTAX of an email address isn't THAT hard,
> but there are a number of edge cases to worry about.
Yes one would think that, but in my experience half of all web sites get
it wrong, insisting that my perfectly valid and
On 2020-12-28, Bischoop wrote:
> On 2020-12-28, Stefan Ram wrote:
>>
>> "@" in s
>>
>
> That's what I thought.
>
>>>I want check if string is a valid email address.
>>
>> I suggest to first try and define "valid email address" in English.
>
> A valid email address consists of an email prefix
On 12/28/20 4:52 PM, Michael Torrie wrote:
> On 12/28/20 10:37 AM, Bischoop wrote:
>> A valid email address consists of an email prefix and an email domain,
>> both in acceptable formats. The prefix appears to the left of the @ symbol.
>> The domain appears to the right of the @ symbol.
>> For
On Tue, Dec 29, 2020 at 8:57 AM dn via Python-list
wrote:
> After such disparagement it is worth remembering that there are checks
> and there are checks! It depends upon the purpose of the check, or the
> level-of-detail/accuracy desired!
>
> When accepting user-data it *is* worth (even
On 28Dec2020 13:08, Mats Wichmann wrote:
>On 12/28/20 10:46 AM, Marco Sulla wrote:
>>On Mon, 28 Dec 2020 at 17:37, Bischoop wrote:
>>>I'd like to check if there's "@" in a string and wondering if any
>>>method is better/safer than others.
Others have pointed out: '@' in s
>Will add that Yes,
On 29/12/2020 09:27, Richard Damon wrote:
On 12/28/20 3:08 PM, Mats Wichmann wrote:
On 12/28/20 10:46 AM, Marco Sulla wrote:
On Mon, 28 Dec 2020 at 17:37, Bischoop wrote:
...
but probably what you really want is a regular expression.
because...
Will add that Yes, you should always
On 12/28/20 10:46 AM, Marco Sulla wrote:
> On Mon, 28 Dec 2020 at 17:37, Bischoop wrote:
>>
>> I'd like to check if there's "@" in a string and wondering if any method
>> is better/safer than others. I was told on one occasion that I should
>> use is than ==, so how would be on this example.
>>
On 12/28/20 10:37 AM, Bischoop wrote:
> A valid email address consists of an email prefix and an email domain,
> both in acceptable formats. The prefix appears to the left of the @ symbol.
> The domain appears to the right of the @ symbol.
> For example, in the address exam...@mail.com, "example"
On 12/28/20 3:08 PM, Mats Wichmann wrote:
> On 12/28/20 10:46 AM, Marco Sulla wrote:
>> On Mon, 28 Dec 2020 at 17:37, Bischoop wrote:
>>>
>>> I'd like to check if there's "@" in a string and wondering if any
>>> method
>>> is better/safer than others. I was told on one occasion that I should
>>>
On 12/28/20 10:46 AM, Marco Sulla wrote:
On Mon, 28 Dec 2020 at 17:37, Bischoop wrote:
I'd like to check if there's "@" in a string and wondering if any method
is better/safer than others. I was told on one occasion that I should
use is than ==, so how would be on this example.
s =
On Tue, Dec 29, 2020 at 6:18 AM Bischoop wrote:
>
> On 2020-12-28, Stefan Ram wrote:
> >
> > "@" in s
> >
>
> That's what I thought.
>
> >>I want check if string is a valid email address.
> >
> > I suggest to first try and define "valid email address" in English.
> >
> >
>
> A valid email
On 12/28/2020 11:31 AM, Bischoop wrote:
I'd like to check if there's "@" in a string
Use the obvious "'@' in string".
> and wondering if any method is better/safer than others.
Any special purpose method built into the language is likely to be
fastest. Safest? What danger are you worried
On 2020-12-28, Stefan Ram wrote:
>
> "@" in s
>
That's what I thought.
>>I want check if string is a valid email address.
>
> I suggest to first try and define "valid email address" in English.
>
>
A valid email address consists of an email prefix and an email domain,
both in acceptable
On 2020-12-28 16:31, Bischoop wrote:
I'd like to check if there's "@" in a string and wondering if any method
is better/safer than others. I was told on one occasion that I should
use is than ==, so how would be on this example.
[snip]
The shortest and quickest way to check whether "@" is in
On Mon, 28 Dec 2020 at 17:37, Bischoop wrote:
>
> I'd like to check if there's "@" in a string and wondering if any method
> is better/safer than others. I was told on one occasion that I should
> use is than ==, so how would be on this example.
>
> s = 't...@mail.is'
You could do simply
if "@"
I'd like to check if there's "@" in a string and wondering if any method
is better/safer than others. I was told on one occasion that I should
use is than ==, so how would be on this example.
s = 't...@mail.is'
I want check if string is a valid email address.
code '''
import time
email =
24 matches
Mail list logo