fix foreign libs regular expression