J
Jugurtha Hadjar
Hello,
# I posted this on the tutor list, but my message wasn't displayed
I shared some assembly code (microcontrollers) and I had a comment wit
my e-mail address for contact purposes.
Supposing my name is John Doe and the e-mail is (e-mail address removed), my
e-mail was written like this:
(e-mail address removed)'
With a note saying to remove the capital letters.
Now, I wrote this :
for character in my_string:
.... if (character == character.upper()) and (character !='@') and
(character != '.'):
.... my_string = my_string.replace(character,'')
And the end result was (e-mail address removed).
Is there a better way to do that ? Without using regular expressions
(Looked *really* ugly and it doesn't really make sense, unlike the few
lines I've written, which are obvious even to a beginner like me).
I obviously don't like SPAM, but I just thought "If I were a spammer,
how would I go about it".
Eventually, some algorithm of detecting the
john<dot>doe<at>hotmail<dot>com must exist.
Also, what would in your opinion make it *harder* for a non-human to
retrieve the original e-mail address? Maybe a function with no inverse
function ? Generating an image that can't be converted back to text, etc..
If this is off-topic, you can just answer the "what is a better way to
do that" part.
Thanks,
# I posted this on the tutor list, but my message wasn't displayed
I shared some assembly code (microcontrollers) and I had a comment wit
my e-mail address for contact purposes.
Supposing my name is John Doe and the e-mail is (e-mail address removed), my
e-mail was written like this:
(e-mail address removed)'
With a note saying to remove the capital letters.
Now, I wrote this :
for character in my_string:
.... if (character == character.upper()) and (character !='@') and
(character != '.'):
.... my_string = my_string.replace(character,'')
And the end result was (e-mail address removed).
Is there a better way to do that ? Without using regular expressions
(Looked *really* ugly and it doesn't really make sense, unlike the few
lines I've written, which are obvious even to a beginner like me).
I obviously don't like SPAM, but I just thought "If I were a spammer,
how would I go about it".
Eventually, some algorithm of detecting the
john<dot>doe<at>hotmail<dot>com must exist.
Also, what would in your opinion make it *harder* for a non-human to
retrieve the original e-mail address? Maybe a function with no inverse
function ? Generating an image that can't be converted back to text, etc..
If this is off-topic, you can just answer the "what is a better way to
do that" part.
Thanks,