class ValidityTools {

	public static int getPortNumber ( String hostandport ) {
		int port = -1;
		try {
			Matcher m = hostAndPortPattern.matcher(hostandport);
			m.matches();
			port = Integer.parseInt( m.group( 2 ).toLowerCase( ).trim( ) );
		} catch ( Exception e ) {}
		return port;
	}

}