Help with regex

i need a help in regular exp, iam trying to find if two strings have all,some or not at all, common letters, if some of the letters are same, create as a new string, eg, str1="acyq" and str2="zyapkf"; i tried this but not getting neaar what i wanted, can someone give me examples even in other way to solve.

public String findSimilarity(String str){

String regvar=null;

String reg="[tap3]+";

Pattern pattern = Pattern.compile(reg);

Matcher matcher = pattern.matcher(str);

while(matcher.find()){

regvar =matcher.group();

}

return regvar;

}

[867 byte] By [fashrmrka] at [2007-10-3 11:33:39]
# 1
1. You say you need to find if two strings are similiar but your method only takes in one?2. Your example of st1 and str2 is incomplete.3. Is this a homework question?4. Why did you post this in the JavaBeans forum?5. What is [tap3]+ supposed to be matching?
zadoka at 2007-7-15 14:01:15 > top of Java-index,Desktop,Developing for the Desktop...
# 2
sorry it was wrong forum, by mistake
fashrmrka at 2007-7-15 14:01:15 > top of Java-index,Desktop,Developing for the Desktop...
# 3
goggle for "regex-coach". This tool is excellent for simple and complex formats. Used to be free but is worth it.
U_arsia at 2007-7-15 14:01:15 > top of Java-index,Desktop,Developing for the Desktop...