in reply to Re^2: how to use validatecommand for string checking
in thread how to use validatecommand for string checking

Another alternative which you may be overlooking, is to forget the -validate stuff, and just bind on the Return keypress, so you get the whole string at once. Then you can regex it.
#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = MainWindow->new(); my $content = ''; my $entry = $mw->Entry(-textvariable => \$content)->pack(); $entry->bind('<Return>',sub{ my $val = $entry->get; print "check with regex here and do what is needed $val\n" }); $entry->focus; MainLoop;

I'm not really a human, but I play one on earth. Cogito ergo sum a bum