note
meredith
Hrm, why arent you using regexes? I'm no master, but I think this will help:<br>
<code>m|\*\*(\w+)\b|g
</code>
If you have all the text in a scalar, you can do this:
<code>
while($text =~ m|\*\*(\w+)\b|g) {
print "Found: " , $1 , "\n";
}
</code>
Is this what you want? Or was there some reason you're using TK's functions??
<br><br>
HTH
<br><br>
<b>Update:</b> explanation of regex <br>
<code>
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 match position in this case)
</code>
In case you're not familar with regexes, run this: <code>perldoc perlretut</code> :)
<br><br><tt>mhoward - at - hattmoward.org</tt>
274695
274695