http://qs321.pair.com?node_id=274813


in reply to Tk text widget indices.

Hrm, why arent you using regexes? I'm no master, but I think this will help:
m|\*\*(\w+)\b|g If you have all the text in a scalar, you can do this:
while($text =~ m|\*\*(\w+)\b|g) { print "Found: " , $1 , "\n"; }
Is this what you want? Or was there some reason you're using TK's functions??

HTH

Update: explanation of regex
m| \* #literal asterisk \* #ditto ( #start capture \w+ #one or more word characters aka [A-Za-z0-9_] ) #end capture \b #word boundary |gx #/x allows whitespace, /g makes it global (restart from last m +atch position in this case)
In case you're not familar with regexes, run this: perldoc perlretut :)

mhoward - at - hattmoward.org