accepts part of string as input (regex)