use regex for scheme handling.