I have something like \"ali123hgj\". i want to have 123 in integer. how can i make it in java?
Use the following RegExp (see http://java.sun.com/docs/books/tutorial/essential/regex/):
\d+
By:
final Pattern pattern = Pattern.compile("\\d+"); // the regex
final Matcher matcher = pattern.matcher("ali123hgj"); // your string
final ArrayList ints = new ArrayList(); // results
while (matcher.find()) { // for each match
ints.add(Integer.parseInt(matcher.group())); // convert to int
}