/* http://es.stackoverflow.com/q/48426/127 */

import java.util.regex.Matcher;
import java.util.regex.Pattern;

class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		final String regex = "^(USB\\S*)\\s*:\\s*(.*)";
		final String string = "USB\\VID_04F2&PID_B2E1&MI_00\\6&9F9657C&0&1200                : Lenovo EasyCamera";
		
		final Pattern pattern = Pattern.compile(regex);
		final Matcher matcher = pattern.matcher(string);
		
		if (matcher.find()) {
		    String webcamID = matcher.group(1);
		    String webcamDeviceName = matcher.group(2);
		    
			System.out.println("Device ID: "+webcamID);
			System.out.println("Device Name: "+webcamDeviceName);
		}
	}
}