Hello Everyone, I am making a GUI using Tkinter... I have completed that the GUI now i want to put the validation on those Entry Widget,,,,,... i know, i have to use the re module...... but i really cannot understand that....can someone please give me the simple example...like if i want the widget to only take ip address ( to ( ......


6 Years
Discussion Span
Last Post by pyTony

Thanks a lot pyTony.....it is very useful.....only one doubt,

pattern = "[\.\w]{2,}[@]\w+[.]\w+"

In this syntax i understand everything, just a doubt in [\.\w] the first one \w u used for the alphanumeric character if i am not wrong, but why you used \. before that... if you could explain me here, it will be very helpful..


I did not do that regexp, somebody else suggested it and I showed it did not work so well in comparision to my Python function. \. Is used in regexp to signify regular point instead of any character.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.