public static int parseFrequency(String value) throws ParseException{
		Pattern p = Pattern.compile("\\s*(((?<mhz>[1-9][0-9]+)\\s*(Mhz)?)|((?<ghz>[1-9](\\.[0-9]+))\\s*Ghz))\\s*");
		Matcher m = p.matcher(value);
		
		if (m.matches()){
			String mhz = m.group("mhz");
			String ghz = m.group("ghz");
			
			if (null != mhz){
				return Integer.parseInt(mhz);
			} else {
				return (int) (Double.parseDouble(ghz) * 1000);
			}
		}
		
		throw new ParseException("Frequency doesn't match pattern");
	}