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:
> print(f
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 occasi
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 th
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 allow
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 tha
.
Dropping out, ...
-Original Message-
From: Python-list On
Behalf Of Chris Angelico
Sent: Monday, December 28, 2020 8:02 PM
To: Python
Subject: Re: Which method to check if string index is queal to character.
On Tue, Dec 29, 2020 at 10:08 AM Avi Gross via Python-list
wrote:
>
> This
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 A
: Python
Subject: Re: Which method to check if string index is queal to character.
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 stri
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 RFC-c
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 exam
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 "necessar
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, y
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 va
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" i
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
>>> u
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 = 't...@mail
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 add
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 a
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 for
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 m
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 "@"
23 matches
Mail list logo