Skip to content

Instantly share code, notes, and snippets.

@rschumm
Created June 21, 2017 09:18
Show Gist options
  • Save rschumm/42affc656cba30354bd4bd7de1cba9be to your computer and use it in GitHub Desktop.
Save rschumm/42affc656cba30354bd4bd7de1cba9be to your computer and use it in GitHub Desktop.
Java Regex 101
public static HypoInterestRohdaten parseLine(String line){
Matcher match = Pattern.compile("Lfz (\\d*).*@(\\d*.\\d*).*").matcher(line);
match.matches();
HypoInterestRohdaten rohdaten = new HypoInterestRohdaten();
rohdaten.setTerm(Integer.parseInt(match.group(1)));
rohdaten.setInterest(Double.parseDouble(match.group(2)));
return rohdaten;
}
//Tipp: https://regex101.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment