This may be oversimplified, but here's what I came up with and it worked for me...
$word1="helloRed"; $word2="hello"; $word1 =~ /$word2(.+)/; print $1; This would be assuming that the word you are subtracting is at the beginning of the other word. Keith -----Original Message----- From: Alex Demmler [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 6:07 PM To: [EMAIL PROTECTED] Subject: How to substract words Hi folks! I have a problem with pattern matching. I want do find the difference between two words. I have tried, but donot get it work. Any tips? Example: 1. Word = helloRed 2. Word = hello ------------------- Result = Red Thanks Alex -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]