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 ( ......


Recommended Answers

All 3 Replies

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.