2 Antworten
Brad, You can use the Pattern and Matcher classes to match against a regular expression to find your claim number inside the subject field. The following will return the first 9-digit number found in the 'subject' input string (or null, if no 9-digit number is found):<pre>String claimNumber = Pattern.compile('(\\d{9})').matcher(subject).group(1);</pre>