This is the code that i have now:

Code:
        Matcher m = Pattern.compile("\\d+\\*\\d+").matcher(text);
        while(m.find()) {
            String strTemp = m.group();
            
            String strSum[] = strTemp.split("*");
            int iLeft = new Integer(strSum[0]).intValue();
            int iRight = new Integer(strSum[1]).intValue();
            
            int iResult = iLeft * iRight;
            String strResult = Integer.toString(iResult);
            
            text = text.replace(strTemp, strResult);
            
            System.out.println(text);
        }