in reply to search for exact word only

I haven't read through all your code (there's rather a lot of it) but in general if you want to search for an exact word, rather than any substring, you can use \b in a regular expression. For example, the following regexp:

/\bABBA\b/i

would match ABBA but not any of your other examples.

I hope this helps. Sorry if I have misunderstood the question.


s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&