Tuesday, September 20, 2022

[ Email validation using Regular Expression ]


The module Regular Expression in Python provides a way to match patterns and I am using it to create my own validator for inputted email addresses. I have spent some time over the pattern that checks an email address and I created a string that is very useful in detecting whether a given email is valid or invalid. It is far from perfect, as I have seen the same string to occupies few lines of code when developed by companies like Google for example, but mine is also effective in catching a lot of fake email addresses or even strings that are not an email address at all. It can be used in web forms where Python code can be implemented in background.

Here is my Regular Expression pattern to validate an email address:

r"^[a-z0-9]+\.?[a-z0-9_]+\.?[a-z0-9]+@[a-z0-9\-]+\.?[a-z0-9\-]+\.[a-z]+$"

It can successfully detect most of the valid email addresses, including those using a dot . in the email name part. I have not included all the allowed by the convention special symbols as by my opinion they are rare in use by common users but same symbols could be easily added to the expression.

My code can also successfully detect many cases of invalid email addresses or attempts by the user to input something only to bypass the usually required field of the email address in various web or other forms.

I will not stop adding further improvements to this code so it will become better in the future. If you have questions or just want to say something about this code, you can use the contact form on the right. I am open to any kind of collaboration as well.

Wednesday, September 14, 2022

[ Calculator ]

In this video I am making a basic calculator program, using Python, that can perform a lot of mathematical operations.



[ Getting information from the Internet ]

In this video I am going to show you how to extract some information from the Internet using a Python code and the popular library Requests.



Monday, July 11, 2022

[ Wonderful journey ]

From the very first lines of code, usually greeting the world with 'Hello, world' all the way to creating GUI based software applications, these are the steps of learning a programming language. I am not an exception and started my journey with Python like this.

Why Python? Well first of all this is a very fast programming language and is friendly when it comes to learning it. It is practical and with it could be created a lot of things. I love writing small but useful applications, some of them using command line interface, others with a graphical interface. Also I love little games and they too could easily be developed using only Python. I also work with HTML and CSS, and they can be used with Python for web projects and more.

Last but not least I have growing interest in machine learning and artificial intelligence that also can benefit from Python as a programming language. And that is the future!

Python is fun!