public static Pair<String, String> findBothinFile(String fileName, 
		Pattern pattern1, int group1, Pattern pattern2, int group2
	) throws FileNotFoundException {
		
		Pair<String, String> p = new Pair<String, String>(null, null);
		Scanner sFile = new Scanner(new File(fileName));
		
		while (sFile.hasNextLine()) {
			String line = sFile.nextLine();
			Matcher m = pattern1.matcher(line);
			Boolean found = m.find();
			if(found) {
				p.first = m.group(group1);
			}
			
			m = pattern2.matcher(line);
			found = m.find();
			if(found) {
				p.second = m.group(group2);
			}
		}
		return p;
	}