Comparing 2 arrays but ignoring certain patterns

view full story

http://www.unix.com – I'm trying to compare 2 array and print the difference at a 3rd file. However how am i going to compare this 2 arrays by ignoring certain patterns: For example: 1st array contains: Code: ctahci cptcsa0 ctsata:25:seed cptcsa1:50:seed ctsata_1:25:seed 2nd array contains: Code: cptcsa0 ctsata cptcsa1 I wanna ignore the ":25:seed" and ":50:seed" in the @removelist during comparison. So that the output file will be: Code: ctahci ctsata_1:25:seed This is the code for me to find the difference but i got no idea on how to ignore the 2 patterns. (HowTos)